diff --git a/src/d_netcmd.c b/src/d_netcmd.c index d2662016d..3c63e1147 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -4961,18 +4961,7 @@ static void Command_Version_f(void) #endif // OS - // Would be nice to use SDL_GetPlatform for this -#if defined (_WIN32) || defined (_WIN64) - 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 + CONS_Printf("%s ", I_GetSysName()); // Bitness if (sizeof(void*) == 4) diff --git a/src/dummy/i_system.c b/src/dummy/i_system.c index cf8144b90..1f2bbb408 100644 --- a/src/dummy/i_system.c +++ b/src/dummy/i_system.c @@ -179,5 +179,11 @@ char *I_ClipboardPaste(void) void I_RegisterSysCommands(void) {} + +const char *I_GetSysName(void) +{ + return NULL; +} + #include "../sdl/dosstr.c" diff --git a/src/i_system.h b/src/i_system.h index 87198c923..6dcea71b5 100644 --- a/src/i_system.h +++ b/src/i_system.h @@ -369,4 +369,9 @@ const char *I_ClipboardPaste(void); void I_RegisterSysCommands(void); + +/** \brief Returns the system name. +*/ +const char *I_GetSysName(void); + #endif diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index a09730a2f..66543b14b 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -4289,4 +4289,9 @@ const CPUInfoFlags *I_CPUInfo(void) // note CPUAFFINITY code used to reside here void I_RegisterSysCommands(void) {} + +const char *I_GetSysName(void) +{ + return SDL_GetPlatform(); +} #endif