1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-23 01:44:22 +00:00

Split the SystemStats::Windows8 enum into 8.0 and 8.1 values.

This commit is contained in:
jules 2014-07-05 13:13:54 +01:00
parent e3d7ec1827
commit 71eafe439c
2 changed files with 11 additions and 8 deletions

View file

@ -137,10 +137,11 @@ static bool isWindowsVersionOrLater (SystemStats::OperatingSystemType target)
switch (target)
{
case SystemStats::WinVista: info.dwMinorVersion = 0; break;
case SystemStats::Windows7: info.dwMinorVersion = 1; break;
case SystemStats::Windows8: info.dwMinorVersion = 2; break;
default: jassertfalse; break;
case SystemStats::WinVista: break;
case SystemStats::Windows7: info.dwMinorVersion = 1; break;
case SystemStats::Windows8_0: info.dwMinorVersion = 2; break;
case SystemStats::Windows8_1: info.dwMinorVersion = 3; break;
default: jassertfalse; break;
}
}
else
@ -165,7 +166,7 @@ static bool isWindowsVersionOrLater (SystemStats::OperatingSystemType target)
SystemStats::OperatingSystemType SystemStats::getOperatingSystemType()
{
const SystemStats::OperatingSystemType types[]
= { Windows8, Windows7, WinVista, WinXP, Win2000 };
= { Windows8_1, Windows8_0, Windows7, WinVista, WinXP, Win2000 };
for (int i = 0; i < numElementsInArray (types); ++i)
if (isWindowsVersionOrLater (types[i]))
@ -181,8 +182,9 @@ String SystemStats::getOperatingSystemName()
switch (getOperatingSystemType())
{
case Windows8_1: name = "Windows 8.1"; break;
case Windows8_0: name = "Windows 8.0"; break;
case Windows7: name = "Windows 7"; break;
case Windows8: name = "Windows 8"; break;
case WinVista: name = "Windows Vista"; break;
case WinXP: name = "Windows XP"; break;
case Win2000: name = "Windows 2000"; break;
@ -194,7 +196,7 @@ String SystemStats::getOperatingSystemName()
String SystemStats::getDeviceDescription()
{
return String::empty;
return String();
}
bool SystemStats::isOperatingSystem64Bit()

View file

@ -64,7 +64,8 @@ public:
WinXP = 0x4106,
WinVista = 0x4107,
Windows7 = 0x4108,
Windows8 = 0x4109,
Windows8_0 = 0x4109,
Windows8_1 = 0x410a,
Windows = 0x4000, /**< To test whether any version of Windows is running,
you can use the expression ((getOperatingSystemType() & Windows) != 0). */