Browse Source

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

tags/2021-05-28
jules 11 years ago
parent
commit
71eafe439c
2 changed files with 11 additions and 8 deletions
  1. +9
    -7
      modules/juce_core/native/juce_win32_SystemStats.cpp
  2. +2
    -1
      modules/juce_core/system/juce_SystemStats.h

+ 9
- 7
modules/juce_core/native/juce_win32_SystemStats.cpp 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()


+ 2
- 1
modules/juce_core/system/juce_SystemStats.h 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). */


Loading…
Cancel
Save