Fixed the Apple TV remote menu button on tvOS 13.2 (thanks Romain Tisserand)
authorSam Lantinga <slouken@libsdl.org>
Fri, 06 Dec 2019 13:48:13 -0800
changeset 13319580cc3860ac3
parent 13318 2b9626c9304a
child 13320 881796f84081
Fixed the Apple TV remote menu button on tvOS 13.2 (thanks Romain Tisserand)
src/joystick/iphoneos/SDL_sysjoystick.m
     1.1 --- a/src/joystick/iphoneos/SDL_sysjoystick.m	Fri Dec 06 13:48:10 2019 -0800
     1.2 +++ b/src/joystick/iphoneos/SDL_sysjoystick.m	Fri Dec 06 13:48:13 2019 -0800
     1.3 @@ -218,14 +218,9 @@
     1.4          device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_B); /* Button X on microGamepad */
     1.5          nbuttons += 2;
     1.6  
     1.7 -        if ([gamepad respondsToSelector:@selector(buttonMenu)] && gamepad.buttonMenu) {
     1.8 -            device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_START);
     1.9 -            ++nbuttons;
    1.10 -        } else {
    1.11 -            device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_START);
    1.12 -            ++nbuttons;
    1.13 -            device->uses_pause_handler = SDL_TRUE;
    1.14 -        }
    1.15 +        device->button_mask |= (1 << SDL_CONTROLLER_BUTTON_START);
    1.16 +        ++nbuttons;
    1.17 +        device->uses_pause_handler = SDL_TRUE;
    1.18  
    1.19          vendor = VENDOR_APPLE;
    1.20          product = 3;