mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- Added Windows 7 (aka Windows NT 6.1) and Server 2008 identification to
I_DetectOS(). SVN r1996 (trunk)
This commit is contained in:
parent
754fe70a79
commit
53b1b7efab
2 changed files with 34 additions and 6 deletions
|
@ -1,4 +1,6 @@
|
|||
November 23, 2009
|
||||
- Added Windows 7 (aka Windows NT 6.1) and Server 2008 identification to
|
||||
I_DetectOS().
|
||||
- Fixed: ArtiPork did not use all its sprite frames.
|
||||
- Fixed: FWadCollection::AddFile() did not call FixPathSeperator(), so
|
||||
savegames would hold the full file path for wads that had been specified
|
||||
|
|
|
@ -480,11 +480,16 @@ void I_WaitVBL(int count)
|
|||
|
||||
void I_DetectOS(void)
|
||||
{
|
||||
OSVERSIONINFO info;
|
||||
OSVERSIONINFOEX info;
|
||||
const char *osname;
|
||||
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
GetVersionEx (&info);
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
if (!GetVersionEx((OSVERSIONINFO *)&info))
|
||||
{
|
||||
// Retry with the older OSVERSIONINFO structure.
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
GetVersionEx((OSVERSIONINFO *)&info);
|
||||
}
|
||||
|
||||
switch (info.dwPlatformId)
|
||||
{
|
||||
|
@ -522,9 +527,30 @@ void I_DetectOS(void)
|
|||
osname = "Server 2003";
|
||||
}
|
||||
}
|
||||
else if (info.dwMajorVersion == 6 && info.dwMinorVersion == 0)
|
||||
else if (info.dwMajorVersion == 6)
|
||||
{
|
||||
osname = "Vista";
|
||||
if (info.dwMinorVersion == 0)
|
||||
{
|
||||
if (info.wProductType == VER_NT_WORKSTATION)
|
||||
{
|
||||
osname = "Vista";
|
||||
}
|
||||
else
|
||||
{
|
||||
osname = "Server 2008";
|
||||
}
|
||||
}
|
||||
else if (info.dwMinorVersion == 1)
|
||||
{
|
||||
if (info.wProductType == VER_NT_WORKSTATION)
|
||||
{
|
||||
osname = "7";
|
||||
}
|
||||
else
|
||||
{
|
||||
osname = "Server 2008 R2";
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -543,7 +569,7 @@ void I_DetectOS(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
Printf ("OS: Windows %s %lu.%lu (Build %lu)\n %s\n",
|
||||
Printf ("OS: Windows %s (NT %lu.%lu) Build %lu\n %s\n",
|
||||
osname,
|
||||
info.dwMajorVersion, info.dwMinorVersion,
|
||||
info.dwBuildNumber, info.szCSDVersion);
|
||||
|
|
Loading…
Reference in a new issue