mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
Fixed build
This commit is contained in:
parent
ac1f896f89
commit
7abacc9f9f
1 changed files with 4 additions and 3 deletions
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
static id connectObserver = nil;
|
||||
static id disconnectObserver = nil;
|
||||
static NSString *GCInputXboxShareButton = @"Button Share";
|
||||
|
||||
#include <Availability.h>
|
||||
#include <objc/message.h>
|
||||
|
|
@ -419,7 +420,7 @@ static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle
|
|||
if (controller.physicalInputProfile.buttons[GCInputXboxPaddleOne] != nil) {
|
||||
device->has_xbox_paddles = SDL_TRUE;
|
||||
}
|
||||
if (controller.physicalInputProfile.buttons[@"Button Share"] != nil) {
|
||||
if (controller.physicalInputProfile.buttons[GCInputXboxShareButton] != nil) {
|
||||
device->has_xbox_share_button = SDL_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -626,7 +627,7 @@ static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle
|
|||
device->button_mask |= (1 << SDL_GAMEPAD_BUTTON_LEFT_PADDLE2);
|
||||
++nbuttons;
|
||||
}
|
||||
if (controller.physicalInputProfile.buttons[@"Button Share"] != nil) {
|
||||
if (controller.physicalInputProfile.buttons[GCInputXboxShareButton] != nil) {
|
||||
device->has_xbox_share_button = SDL_TRUE;
|
||||
device->button_mask |= (1 << SDL_GAMEPAD_BUTTON_MISC1);
|
||||
++nbuttons;
|
||||
|
|
@ -1270,7 +1271,7 @@ static void IOS_MFIJoystickUpdate(SDL_Joystick *joystick)
|
|||
}
|
||||
|
||||
if (device->has_xbox_share_button) {
|
||||
buttons[button_count++] = controller.physicalInputProfile.buttons[@"Button Share"].isPressed;
|
||||
buttons[button_count++] = controller.physicalInputProfile.buttons[GCInputXboxShareButton].isPressed;
|
||||
}
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue