mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
macOS: Fix getOperatingSystemType when getOSXVersion returns 11.0 instead of 10.16
This commit is contained in:
parent
a5c86be57a
commit
3ad4835854
1 changed files with 10 additions and 3 deletions
|
|
@ -137,10 +137,17 @@ SystemStats::OperatingSystemType SystemStats::getOperatingSystemType()
|
|||
StringArray parts;
|
||||
parts.addTokens (getOSXVersion(), ".", StringRef());
|
||||
|
||||
const int major = parts[1].getIntValue();
|
||||
jassert ((parts[0].getIntValue() == 10 && major > 2) || parts[0].getIntValue() == 11);
|
||||
const auto major = parts[0].getIntValue();
|
||||
const auto minor = parts[1].getIntValue();
|
||||
|
||||
return (OperatingSystemType) (major + MacOSX_10_4 - 4);
|
||||
if (major == 10)
|
||||
{
|
||||
jassert (minor > 2);
|
||||
return (OperatingSystemType) (minor + MacOSX_10_4 - 4);
|
||||
}
|
||||
|
||||
jassert (major == 11 && minor == 0);
|
||||
return MacOSX_11_0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue