From efa8204873884c5654ea0828467d7d5ac866dcc5 Mon Sep 17 00:00:00 2001 From: Rechi Date: Tue, 19 Sep 2017 09:24:09 +0200 Subject: [cleanup][osx] remove Is(Lion|SnowLeopard) check functions minimum required OS X version is already higher (10.8 - Mountain Lion) --- system/settings/darwin_osx.xml | 7 ------ xbmc/platform/darwin/DarwinUtils.h | 2 -- xbmc/platform/darwin/DarwinUtils.mm | 35 ------------------------------ xbmc/settings/SettingConditions.cpp | 4 ---- xbmc/storage/osx/DarwinStorageProvider.cpp | 6 ----- 5 files changed, 54 deletions(-) diff --git a/system/settings/darwin_osx.xml b/system/settings/darwin_osx.xml index 852f524618..b48031c2aa 100644 --- a/system/settings/darwin_osx.xml +++ b/system/settings/darwin_osx.xml @@ -1,13 +1,6 @@
- - - - OsxIsSnowLeopard - - - diff --git a/xbmc/platform/darwin/DarwinUtils.h b/xbmc/platform/darwin/DarwinUtils.h index 19c7ee713e..6a11b125d6 100644 --- a/xbmc/platform/darwin/DarwinUtils.h +++ b/xbmc/platform/darwin/DarwinUtils.h @@ -32,8 +32,6 @@ class CDarwinUtils public: static const char *getIosPlatformString(void); static bool IsMavericks(void); - static bool IsLion(void); - static bool IsSnowLeopard(void); static bool DeviceHasRetina(double &scale); static bool DeviceHasLeakyVDA(void); static const char *GetOSReleaseString(void); diff --git a/xbmc/platform/darwin/DarwinUtils.mm b/xbmc/platform/darwin/DarwinUtils.mm index 63f75f8ca8..7c5a94a350 100644 --- a/xbmc/platform/darwin/DarwinUtils.mm +++ b/xbmc/platform/darwin/DarwinUtils.mm @@ -43,14 +43,6 @@ #import "AutoPool.h" #import "DarwinUtils.h" -#ifndef NSAppKitVersionNumber10_5 -#define NSAppKitVersionNumber10_5 949 -#endif - -#ifndef NSAppKitVersionNumber10_6 -#define NSAppKitVersionNumber10_6 1038 -#endif - #ifndef NSAppKitVersionNumber10_9 #define NSAppKitVersionNumber10_9 1265 #endif @@ -232,33 +224,6 @@ 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; -#if defined(TARGET_DARWIN_OSX) - if (isSnowLeopard == -1) - { - double appKitVersion = floor(NSAppKitVersionNumber); - isSnowLeopard = (appKitVersion <= NSAppKitVersionNumber10_6 && appKitVersion > NSAppKitVersionNumber10_5) ? 1 : 0; - } -#endif - return isSnowLeopard == 1; -} - bool CDarwinUtils::DeviceHasRetina(double &scale) { static enum iosPlatform platform = iDeviceUnknown; diff --git a/xbmc/settings/SettingConditions.cpp b/xbmc/settings/SettingConditions.cpp index d7cb995e63..237b2540e2 100644 --- a/xbmc/settings/SettingConditions.cpp +++ b/xbmc/settings/SettingConditions.cpp @@ -331,10 +331,6 @@ void CSettingConditions::Initialize() if (aml_present()) m_simpleConditions.insert("have_amcodec"); #endif -#ifdef TARGET_DARWIN_OSX - if (CDarwinUtils::IsSnowLeopard()) - m_simpleConditions.insert("osxissnowleopard"); -#endif #if defined(TARGET_WINDOWS) m_simpleConditions.insert("has_dx"); m_simpleConditions.insert("hasdxva2"); diff --git a/xbmc/storage/osx/DarwinStorageProvider.cpp b/xbmc/storage/osx/DarwinStorageProvider.cpp index 6d3020f75c..6d43f1e0cc 100644 --- a/xbmc/storage/osx/DarwinStorageProvider.cpp +++ b/xbmc/storage/osx/DarwinStorageProvider.cpp @@ -76,9 +76,6 @@ void CDarwinStorageProvider::GetLocalDrives(VECSOURCES &localDrives) share.m_ignore = true; localDrives.push_back(share); - if (CDarwinUtils::IsLion()) - return; //temp workaround for crash in Cocoa_GetVolumeNameFromMountPoint on 10.7.x - // This will pick up all local non-removable disks including the Root Disk. DASessionRef session = DASessionCreate(kCFAllocatorDefault); if (session) @@ -123,9 +120,6 @@ void CDarwinStorageProvider::GetRemovableDrives(VECSOURCES &removableDrives) { #if defined(TARGET_DARWIN_OSX) - if (CDarwinUtils::IsLion()) - return; //temp workaround for crash in Cocoa_GetVolumeNameFromMountPoint on 10.7.x - DASessionRef session = DASessionCreate(kCFAllocatorDefault); if (session) { -- cgit v1.2.3