diff --git a/apple/common/apple_gamecontroller.m b/apple/common/apple_gamecontroller.m index 6390d789b5..a0a82c991f 100644 --- a/apple/common/apple_gamecontroller.m +++ b/apple/common/apple_gamecontroller.m @@ -22,7 +22,7 @@ static BOOL apple_gamecontroller_available(void) { - if (IOS_IS_VERSION_6_OR_LOWER()) + if (get_ios_version_major() <= 6) return false; /* by checking for extern symbols defined by the framework, we can check for its * existence at runtime. This is the Apple endorsed way of dealing with this */ diff --git a/apple/iOS/browser.m b/apple/iOS/browser.m index 5e50319df5..764a309646 100644 --- a/apple/iOS/browser.m +++ b/apple/iOS/browser.m @@ -326,8 +326,8 @@ static void file_action(enum file_action action, NSString* source, NSString* tar { bool is_zip; UIActionSheet *menu; - NSString *button4_name = (IOS_IS_VERSION_7_OR_HIGHER()) ? @"AirDrop" : @"Delete"; - NSString *button5_name = (IOS_IS_VERSION_7_OR_HIGHER()) ? @"Delete" : nil; + NSString *button4_name = (get_ios_version_major() >= 7) ? @"AirDrop" : @"Delete"; + NSString *button5_name = (get_ios_version_major() >= 7) ? @"Delete" : nil; self.selectedItem = [self itemForIndexPath:idx_path]; is_zip = !(strcmp(self.selectedItem.path.pathExtension.UTF8String, "zip")); @@ -367,7 +367,7 @@ static void file_action(enum file_action action, NSString* source, NSString* tar [alertView show]; } #ifdef __IPHONE_7_0 - else if (!strcmp(action.UTF8String, "AirDrop") && IOS_IS_VERSION_7_OR_HIGHER()) + else if (!strcmp(action.UTF8String, "AirDrop") && (get_ios_version_major() >= 7)) { // TODO: Zip if not already zipped diff --git a/apple/iOS/platform.h b/apple/iOS/platform.h index 6d73285242..fe20b67531 100644 --- a/apple/iOS/platform.h +++ b/apple/iOS/platform.h @@ -50,10 +50,6 @@ const void* apple_get_frontend_settings(void); - (void)refreshSystemConfig; @end -// modes are: keyboard, icade and btstack int get_ios_version_major(void); -#define IOS_IS_VERSION_7_OR_HIGHER() ((get_ios_version_major() >= 7)) -#define IOS_IS_VERSION_6_OR_LOWER() ((get_ios_version_major() <= 6)) - #endif diff --git a/apple/iOS/platform.m b/apple/iOS/platform.m index c49f2c7422..c014e48c22 100644 --- a/apple/iOS/platform.m +++ b/apple/iOS/platform.m @@ -205,7 +205,7 @@ enum if (event.allTouches.count) handle_touch_event(event.allTouches.allObjects); - if (!(IOS_IS_VERSION_7_OR_HIGHER()) && [event respondsToSelector:@selector(_gsEvent)]) + if (!(get_ios_version_major() >= 7) && [event respondsToSelector:@selector(_gsEvent)]) { // Stolen from: http://nacho4d-nacho4d.blogspot.com/2012/01/catching-keyboard-events-in-ios.html const uint8_t* eventMem = objc_unretainedPointer([event performSelector:@selector(_gsEvent)]);