From b0b12e46ba0798331b7c871b0fe1bdb8e682d8a3 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 27 Apr 2020 13:31:10 -0700 Subject: [PATCH] Fixed running on older versions of iOS --- src/joystick/check_8bitdo.sh | 0 src/video/uikit/SDL_uikitview.m | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 src/joystick/check_8bitdo.sh diff --git a/src/joystick/check_8bitdo.sh b/src/joystick/check_8bitdo.sh old mode 100644 new mode 100755 diff --git a/src/video/uikit/SDL_uikitview.m b/src/video/uikit/SDL_uikitview.m index 3b2287ad0..b9ecfed3b 100644 --- a/src/video/uikit/SDL_uikitview.m +++ b/src/video/uikit/SDL_uikitview.m @@ -367,9 +367,11 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick; - (SDL_Scancode)scancodeFromPress:(UIPress*)press { #ifdef __IPHONE_13_4 - if (press.key != nil) { - return (SDL_Scancode)press.key.keyCode; - } + if ([press respondsToSelector:@selector((key))]) { + if (press.key != nil) { + return (SDL_Scancode)press.key.keyCode; + } + } #endif /* Presses from Apple TV remote */