mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-05-31 17:30:27 +00:00
Cleanup for previous change, fixing typos, etc.
(cherry picked from commit 883b0f4071687f2e5c8329963f97504e9679394b)
This commit is contained in:
parent
fc72f12e7f
commit
3f6c4ec6d0
|
@ -2148,7 +2148,7 @@ static SDL_bool LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMap
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SDL_JoystickGetVendor(joystick) == USB_VENDOR_MICROSOFT) {
|
if (SDL_JoystickGetVendor(joystick) == USB_VENDOR_MICROSOFT) {
|
||||||
/* The Xbox Elite controllers have the paddles as BTN_TRIGGER_HAPPY4 - BTN_TRIGGER_HAPPY7 */
|
/* The Xbox Elite controllers have the paddles as BTN_TRIGGER_HAPPY5 - BTN_TRIGGER_HAPPY8 */
|
||||||
if (joystick->hwdata->has_key[BTN_TRIGGER_HAPPY5] &&
|
if (joystick->hwdata->has_key[BTN_TRIGGER_HAPPY5] &&
|
||||||
joystick->hwdata->has_key[BTN_TRIGGER_HAPPY6] &&
|
joystick->hwdata->has_key[BTN_TRIGGER_HAPPY6] &&
|
||||||
joystick->hwdata->has_key[BTN_TRIGGER_HAPPY7] &&
|
joystick->hwdata->has_key[BTN_TRIGGER_HAPPY7] &&
|
||||||
|
@ -2162,10 +2162,10 @@ static SDL_bool LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMap
|
||||||
out->paddle4.kind = EMappingKind_Button;
|
out->paddle4.kind = EMappingKind_Button;
|
||||||
out->paddle4.target = joystick->hwdata->key_map[BTN_TRIGGER_HAPPY8];
|
out->paddle4.target = joystick->hwdata->key_map[BTN_TRIGGER_HAPPY8];
|
||||||
#ifdef DEBUG_GAMEPAD_MAPPING
|
#ifdef DEBUG_GAMEPAD_MAPPING
|
||||||
SDL_Log("Mapped PADDLE1 to button %d (BTN_TRIGGER_HAPPY4)", out->paddle1.target);
|
SDL_Log("Mapped PADDLE1 to button %d (BTN_TRIGGER_HAPPY5)", out->paddle1.target);
|
||||||
SDL_Log("Mapped PADDLE2 to button %d (BTN_TRIGGER_HAPPY6)", out->paddle2.target);
|
SDL_Log("Mapped PADDLE2 to button %d (BTN_TRIGGER_HAPPY7)", out->paddle2.target);
|
||||||
SDL_Log("Mapped PADDLE3 to button %d (BTN_TRIGGER_HAPPY5)", out->paddle3.target);
|
SDL_Log("Mapped PADDLE3 to button %d (BTN_TRIGGER_HAPPY6)", out->paddle3.target);
|
||||||
SDL_Log("Mapped PADDLE4 to button %d (BTN_TRIGGER_HAPPY7)", out->paddle4.target);
|
SDL_Log("Mapped PADDLE4 to button %d (BTN_TRIGGER_HAPPY8)", out->paddle4.target);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2173,7 +2173,6 @@ static SDL_bool LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMap
|
||||||
if (joystick->hwdata->has_key[KEY_RECORD]) {
|
if (joystick->hwdata->has_key[KEY_RECORD]) {
|
||||||
out->misc1.kind = EMappingKind_Button;
|
out->misc1.kind = EMappingKind_Button;
|
||||||
out->misc1.target = joystick->hwdata->key_map[KEY_RECORD];
|
out->misc1.target = joystick->hwdata->key_map[KEY_RECORD];
|
||||||
mapped |= MAPPED_DPAD_RIGHT;
|
|
||||||
#ifdef DEBUG_GAMEPAD_MAPPING
|
#ifdef DEBUG_GAMEPAD_MAPPING
|
||||||
SDL_Log("Mapped MISC1 to button %d (KEY_RECORD)", out->misc1.target);
|
SDL_Log("Mapped MISC1 to button %d (KEY_RECORD)", out->misc1.target);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue