src/joystick/iphoneos/SDL_sysjoystick.m
changeset 12588 1fc2169984ad
parent 12503 806492103856
equal deleted inserted replaced
12587:b2d4dcb4ba33 12588:1fc2169984ad
   528             Uint8 buttons[] = {
   528             Uint8 buttons[] = {
   529                 gamepad.buttonA.isPressed, gamepad.buttonB.isPressed,
   529                 gamepad.buttonA.isPressed, gamepad.buttonB.isPressed,
   530                 gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
   530                 gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
   531                 gamepad.leftShoulder.isPressed,
   531                 gamepad.leftShoulder.isPressed,
   532                 gamepad.rightShoulder.isPressed,
   532                 gamepad.rightShoulder.isPressed,
       
   533                 joystick->delayed_guide_button,
   533             };
   534             };
   534 
   535 
   535             hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
   536             hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
   536 
   537 
   537             for (i = 0; i < SDL_arraysize(axes); i++) {
   538             for (i = 0; i < SDL_arraysize(axes); i++) {
   555             Uint8 buttons[] = {
   556             Uint8 buttons[] = {
   556                 gamepad.buttonA.isPressed, gamepad.buttonB.isPressed,
   557                 gamepad.buttonA.isPressed, gamepad.buttonB.isPressed,
   557                 gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
   558                 gamepad.buttonX.isPressed, gamepad.buttonY.isPressed,
   558                 gamepad.leftShoulder.isPressed,
   559                 gamepad.leftShoulder.isPressed,
   559                 gamepad.rightShoulder.isPressed,
   560                 gamepad.rightShoulder.isPressed,
       
   561                 joystick->delayed_guide_button,
   560             };
   562             };
   561 
   563 
   562             hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
   564             hatstate = IOS_MFIJoystickHatStateForDPad(gamepad.dpad);
   563 
   565 
   564             for (i = 0; i < SDL_arraysize(buttons); i++) {
   566             for (i = 0; i < SDL_arraysize(buttons); i++) {
   581             }
   583             }
   582 
   584 
   583             Uint8 buttons[] = {
   585             Uint8 buttons[] = {
   584                 gamepad.buttonA.isPressed,
   586                 gamepad.buttonA.isPressed,
   585                 gamepad.buttonX.isPressed,
   587                 gamepad.buttonX.isPressed,
       
   588                 joystick->delayed_guide_button,
   586             };
   589             };
   587 
   590 
   588             for (i = 0; i < SDL_arraysize(buttons); i++) {
   591             for (i = 0; i < SDL_arraysize(buttons); i++) {
   589                 updateplayerindex |= (joystick->buttons[i] != buttons[i]);
   592                 updateplayerindex |= (joystick->buttons[i] != buttons[i]);
   590                 SDL_PrivateJoystickButton(joystick, i, buttons[i]);
   593                 SDL_PrivateJoystickButton(joystick, i, buttons[i]);