From 3bfa6e4ff0aca08f902f46a9dcebd8744a98b1d1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 24 Feb 2015 23:46:54 +0100 Subject: [PATCH] (iOS) apple_gamecontroller.m - for now, put in compile-time ifdefs to make sure we can at least still build on lower iOS SDK versions --- apple/common/apple_gamecontroller.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apple/common/apple_gamecontroller.m b/apple/common/apple_gamecontroller.m index eefed22215..6390d789b5 100644 --- a/apple/common/apple_gamecontroller.m +++ b/apple/common/apple_gamecontroller.m @@ -15,6 +15,7 @@ #include #include "RetroArch_Apple.h" +#ifdef __IPHONE_7_0 #import #include "apple_gamecontroller.h" #include "../../input/drivers/apple_input.h" @@ -25,7 +26,11 @@ static BOOL apple_gamecontroller_available(void) 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 */ +#ifdef __IPHONE_7_0 return (&GCControllerDidConnectNotification && &GCControllerDidDisconnectNotification); +#else + return false; +#endif } static void apple_gamecontroller_poll(GCController *controller) @@ -130,9 +135,11 @@ static void apple_gamecontroller_disconnect(GCController* controller) pad_connection_pad_deinit(&slots[pad], pad); } +#endif void apple_gamecontroller_init(void) { +#ifdef __IPHONE_7_0 if (!apple_gamecontroller_available()) return; @@ -149,4 +156,5 @@ void apple_gamecontroller_init(void) usingBlock:^(NSNotification *note) { apple_gamecontroller_disconnect([note object]); } ]; +#endif }