Fixed running on older versions of iOS
authorSam Lantinga <slouken@libsdl.org>
Mon, 27 Apr 2020 13:31:10 -0700
changeset 137820d962fba6f52
parent 13781 a564e72e3b2d
child 13783 d1b79a4a95be
Fixed running on older versions of iOS
src/joystick/check_8bitdo.sh
src/video/uikit/SDL_uikitview.m
     2.1 --- a/src/video/uikit/SDL_uikitview.m	Fri Apr 24 02:06:53 2020 -0400
     2.2 +++ b/src/video/uikit/SDL_uikitview.m	Mon Apr 27 13:31:10 2020 -0700
     2.3 @@ -367,9 +367,11 @@
     2.4  - (SDL_Scancode)scancodeFromPress:(UIPress*)press
     2.5  {
     2.6  #ifdef __IPHONE_13_4
     2.7 -    if (press.key != nil) {
     2.8 -        return (SDL_Scancode)press.key.keyCode;
     2.9 -    }
    2.10 +    if ([press respondsToSelector:@selector((key))]) {
    2.11 +		if (press.key != nil) {
    2.12 +			return (SDL_Scancode)press.key.keyCode;
    2.13 +		}
    2.14 +	}
    2.15  #endif
    2.16  
    2.17      /* Presses from Apple TV remote */