aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2015-08-28 09:46:46 +0200
committerMemphiz <memphis@machzwo.de>2015-08-28 09:46:46 +0200
commit1d26a1ff992b2eb76ebbea071cfae5e1ed109c35 (patch)
tree818bd935f2b1e64fa298a68d92a320adb424e24c
parent355e7bc69c3f787ce46c1080b4be55e79306a7b2 (diff)
[osx/darwinutils] - add implementation for IsLion to determine 10.7.x runtime
-rw-r--r--xbmc/osx/DarwinUtils.mm14
1 files changed, 14 insertions, 0 deletions
diff --git a/xbmc/osx/DarwinUtils.mm b/xbmc/osx/DarwinUtils.mm
index 75ece9f8b5..b1b282f5d1 100644
--- a/xbmc/osx/DarwinUtils.mm
+++ b/xbmc/osx/DarwinUtils.mm
@@ -212,6 +212,20 @@ bool CDarwinUtils::IsMavericks(void)
return isMavericks == 1;
}
+bool CDarwinUtils::IsLion(void)
+{
+ static int isLion = -1;
+#if defined(TARGET_DARWIN_OSX)
+ if (isLion == -1)
+ {
+ double appKitVersion = floor(NSAppKitVersionNumber);
+ // everything lower 10.8 is 10.7.x because 10.7 is deployment target...
+ isLion = (appKitVersion < NSAppKitVersionNumber10_8) ? 1 : 0;
+ }
+#endif
+ return isLion == 1;
+}
+
bool CDarwinUtils::IsSnowLeopard(void)
{
static int isSnowLeopard = -1;