Merge branch 'versionflags' into '21-version'

Add OS and 32/64-bitness to VERSION console command

See merge request STJr/SRB2!368
This commit is contained in:
Digiku 2018-12-05 13:15:21 -05:00
commit 68ed55fa71

View file

@ -3421,10 +3421,51 @@ static void Command_ListWADS_f(void)
static void Command_Version_f(void) static void Command_Version_f(void)
{ {
#ifdef DEVELOP #ifdef DEVELOP
CONS_Printf("Sonic Robo Blast 2 %s-%s (%s %s)\n", compbranch, comprevision, compdate, comptime); CONS_Printf("Sonic Robo Blast 2 %s-%s (%s %s) ", compbranch, comprevision, compdate, comptime);
#else #else
CONS_Printf("Sonic Robo Blast 2 %s (%s %s %s)\n", VERSIONSTRING, compdate, comptime, comprevision); CONS_Printf("Sonic Robo Blast 2 %s (%s %s %s) ", VERSIONSTRING, compdate, comptime, comprevision);
#endif #endif
// Base library
#if defined( HAVE_SDL)
CONS_Printf("SDL ");
#elif defined(_WINDOWS)
CONS_Printf("DD ");
#endif
// OS
// Would be nice to use SDL_GetPlatform for this
#if defined(_WIN32)
CONS_Printf("Windows ");
#elif defined(LINUX)
CONS_Printf("Linux ");
#elif defined(MACOSX)
CONS_Printf("macOS" );
#elif defined(UNIXCOMMON)
CONS_Printf("Unix (Common) ");
#else
CONS_Printf("Other OS ");
#endif
// Bitness
if (sizeof(void*) == 4)
CONS_Printf("32-bit ");
else if (sizeof(void*) == 8)
CONS_Printf("64-bit ");
else // 16-bit? 128-bit?
CONS_Printf("Bits Unknown ");
// No ASM?
#ifdef NOASM
CONS_Printf("\x85" "NOASM " "\x80");
#endif
// Debug build
#ifdef _DEBUG
CONS_Printf("\x85" "DEBUG " "\x80");
#endif
CONS_Printf("\n");
} }
#ifdef UPDATE_ALERT #ifdef UPDATE_ALERT