diff --git a/src/dummy/i_system.c b/src/dummy/i_system.c
index fe33cfe3ef46bdfecf38b3187d3946242b601551..ecabe3576d3f15b06513315a945562076587aff5 100644
--- a/src/dummy/i_system.c
+++ b/src/dummy/i_system.c
@@ -206,5 +206,10 @@ void I_GetCursorPosition(INT32 *x, INT32 *y)
 	(void)y;
 }
 
+const char *I_GetSysName(void)
+{
+	return NULL;
+}
+
 #include "../sdl/dosstr.c"
 
diff --git a/src/i_system.h b/src/i_system.h
index 834dd4091487b295fd1faed9d11018e498d79b12..3f0e05d127fa4ed5ce9aa8fbe89ff109773851f4 100644
--- a/src/i_system.h
+++ b/src/i_system.h
@@ -335,4 +335,8 @@ void I_GetCursorPosition(INT32 *x, INT32 *y);
 */
 void I_SetMouseGrab(boolean grab);
 
+/** \brief Returns the system name.
+*/
+const char *I_GetSysName(void);
+
 #endif
diff --git a/src/netcode/d_netcmd.c b/src/netcode/d_netcmd.c
index 87f0110a9490d8a85e88c39d51d745ccede2af0d..085aa25526521e4341a5d1852eba34d32bf0bdda 100644
--- a/src/netcode/d_netcmd.c
+++ b/src/netcode/d_netcmd.c
@@ -3812,18 +3812,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/sdl/i_system.c b/src/sdl/i_system.c
index 847806270f78175624fd2fabcdcf32a0b9e0e29e..8faf56d3bb9308e3c6ce571edbddbf0031bea704 100644
--- a/src/sdl/i_system.c
+++ b/src/sdl/i_system.c
@@ -3256,4 +3256,10 @@ 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