mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Get rid of messy IS_IOS_VERSION macros
This commit is contained in:
parent
3bfa6e4ff0
commit
91fe5c52b4
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
static BOOL apple_gamecontroller_available(void)
|
static BOOL apple_gamecontroller_available(void)
|
||||||
{
|
{
|
||||||
if (IOS_IS_VERSION_6_OR_LOWER())
|
if (get_ios_version_major() <= 6)
|
||||||
return false;
|
return false;
|
||||||
/* by checking for extern symbols defined by the framework, we can check for its
|
/* 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 */
|
* existence at runtime. This is the Apple endorsed way of dealing with this */
|
||||||
|
@ -326,8 +326,8 @@ static void file_action(enum file_action action, NSString* source, NSString* tar
|
|||||||
{
|
{
|
||||||
bool is_zip;
|
bool is_zip;
|
||||||
UIActionSheet *menu;
|
UIActionSheet *menu;
|
||||||
NSString *button4_name = (IOS_IS_VERSION_7_OR_HIGHER()) ? @"AirDrop" : @"Delete";
|
NSString *button4_name = (get_ios_version_major() >= 7) ? @"AirDrop" : @"Delete";
|
||||||
NSString *button5_name = (IOS_IS_VERSION_7_OR_HIGHER()) ? @"Delete" : nil;
|
NSString *button5_name = (get_ios_version_major() >= 7) ? @"Delete" : nil;
|
||||||
|
|
||||||
self.selectedItem = [self itemForIndexPath:idx_path];
|
self.selectedItem = [self itemForIndexPath:idx_path];
|
||||||
is_zip = !(strcmp(self.selectedItem.path.pathExtension.UTF8String, "zip"));
|
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];
|
[alertView show];
|
||||||
}
|
}
|
||||||
#ifdef __IPHONE_7_0
|
#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
|
// TODO: Zip if not already zipped
|
||||||
|
|
||||||
|
@ -50,10 +50,6 @@ const void* apple_get_frontend_settings(void);
|
|||||||
- (void)refreshSystemConfig;
|
- (void)refreshSystemConfig;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// modes are: keyboard, icade and btstack
|
|
||||||
int get_ios_version_major(void);
|
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
|
#endif
|
||||||
|
@ -205,7 +205,7 @@ enum
|
|||||||
if (event.allTouches.count)
|
if (event.allTouches.count)
|
||||||
handle_touch_event(event.allTouches.allObjects);
|
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
|
// 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)]);
|
const uint8_t* eventMem = objc_unretainedPointer([event performSelector:@selector(_gsEvent)]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user