aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2016-05-30 21:46:18 +0100
committerAndy Nichols <andy.nichols@qt.io>2016-05-31 12:55:43 +0000
commit4e8538d5a4596eb546c1dd55073e2482b1f6b594 (patch)
treefe0acbeab3ea089f7b6dad1e8f2de63e54a2eb08
parentb3f96027baf5602e17743057c67a5297a2045c5b (diff)
Fix iOS < 9.0 and OSX < 10.11 builds
GCControllerPlayerIndex type was introduced in iOS 9 and OSX 10.11 respectively. Previously was just an int. Was breaking CI builds which uses 10.10 (despite policy of using latest OSX for builds). Change-Id: Ic876daddd261fb4719f604c51d19ab9dcb790fa1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r--src/plugins/gamepads/ios/qiosgamepadbackend.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/gamepads/ios/qiosgamepadbackend.mm b/src/plugins/gamepads/ios/qiosgamepadbackend.mm
index c98d38a..245c0d3 100644
--- a/src/plugins/gamepads/ios/qiosgamepadbackend.mm
+++ b/src/plugins/gamepads/ios/qiosgamepadbackend.mm
@@ -105,7 +105,11 @@
break;
}
}
+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11) || QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_9_0) || defined(Q_OS_TVOS)
controller.playerIndex = GCControllerPlayerIndex(index);
+#else
+ controller.playerIndex = index;
+#endif
QMetaObject::invokeMethod(backend, "iosGamepadAdded", Qt::AutoConnection, Q_ARG(int, index));