Add common I_GetSysName function
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2308
This commit is contained in:
1 parent
17c71a2528
commit
f3eedc03e6
4 files changed
+17
-12
No files matched your search
+1
-12
@@ -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)
|
||||
|
||||
@@ -179,5 +179,11 @@ char *I_ClipboardPaste(void)
|
||||
|
||||
void I_RegisterSysCommands(void) {}
|
||||
|
||||
|
||||
const char *I_GetSysName(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#include "../sdl/dosstr.c"
|
||||
|
||||
@@ -369,4 +369,9 @@ const char *I_ClipboardPaste(void);
|
||||
|
||||
void I_RegisterSysCommands(void);
|
||||
|
||||
|
||||
/** \brief Returns the system name.
|
||||
*/
|
||||
const char *I_GetSysName(void);
|
||||
|
||||
#endif
|
||||
@@ -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
|
||||
Reference in new issue
Block a user