Dolphin System information window: Added basic and untested linux os information check. And also moved the windows.h include down into the ifdef

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4563 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid 2009-11-14 13:00:29 +00:00
parent 2eff42f659
commit ee57003ea9
1 changed files with 16 additions and 12 deletions

View File

@ -19,7 +19,6 @@
#define __SUMMARIZE_H__ #define __SUMMARIZE_H__
#include <windows.h> #include <windows.h>
#include <dos.h>
std::string Summarize_Plug() std::string Summarize_Plug()
{ {
@ -131,8 +130,11 @@ std::string Summarize_Drives()
std::string Summarize_OS(void) std::string Summarize_OS(void)
{ {
std::string operatingSystem = "Operating System: "; std::string operatingSystem;
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h>
OSVERSIONINFO osver; OSVERSIONINFO osver;
osver.dwOSVersionInfoSize = sizeof(osver); osver.dwOSVersionInfoSize = sizeof(osver);
@ -145,15 +147,15 @@ std::string Summarize_OS(void)
{ {
case 1: case 1:
if(osver.dwPlatformId == VER_NT_WORKSTATION) if(osver.dwPlatformId == VER_NT_WORKSTATION)
operatingSystem += "Windows 7"; operatingSystem = "Windows 7";
else else
operatingSystem += "Windows Server 2008 R2"; operatingSystem += "Windows Server 2008 R2";
break; break;
case 0: case 0:
if(osver.dwPlatformId == VER_NT_WORKSTATION) if(osver.dwPlatformId == VER_NT_WORKSTATION)
operatingSystem += "Windows Vista"; operatingSystem = "Windows Vista";
else else
operatingSystem += "Windows Server 2008"; operatingSystem = "Windows Server 2008";
break; break;
} }
break; break;
@ -162,25 +164,27 @@ std::string Summarize_OS(void)
{ {
case 2: case 2:
if(GetSystemMetrics(SM_SERVERR2) != 0) if(GetSystemMetrics(SM_SERVERR2) != 0)
operatingSystem += "Windows Server 2003 R2"; operatingSystem = "Windows Server 2003 R2";
else else
operatingSystem += "Windows Server 2003"; operatingSystem = "Windows Server 2003";
break; break;
case 1: case 1:
operatingSystem += "Windows XP"; operatingSystem = "Windows XP";
break; break;
case 0: case 0:
operatingSystem += "Windows 2000"; operatingSystem = "Windows 2000";
break; break;
} }
break; break;
} }
} }
#else #else
operatingSystem = std::string("Non Windows operating system"); #ifdef __linux__
#include "linux/version.h"
operatingSystem = UTS_RELEASE;
#endif #endif
#endif
return operatingSystem; return StringFromFormat("Operating System: %s",operatingSystem);
} }