mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 12:35:23 +00:00
(360) Special button mappings added - RSTICK Up - Rewind - RSTICK
Up + RT - Load State - RSTICK Down + RT - Save State -RSTICK Left + RT - Save State Minus - RSTICK Right + RT - Save State Plus
This commit is contained in:
parent
2cd7349cac
commit
e5e19edc65
@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
static XINPUT_STATE state[4];
|
static XINPUT_STATE state[4];
|
||||||
|
|
||||||
|
const int DEADZONE = 16000;
|
||||||
|
|
||||||
static void xdk360_input_poll(void *data)
|
static void xdk360_input_poll(void *data)
|
||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
@ -110,9 +112,22 @@ static void* xdk360_input_init(void)
|
|||||||
static bool xdk360_key_pressed(void *data, int key)
|
static bool xdk360_key_pressed(void *data, int key)
|
||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
|
XInputGetState(0, &state[0]);
|
||||||
|
|
||||||
switch(key)
|
switch(key)
|
||||||
{
|
{
|
||||||
|
case SSNES_FAST_FORWARD_HOLD_KEY:
|
||||||
|
return ((state[0].Gamepad.sThumbRY < -DEADZONE) && !(state[0].Gamepad.bRightTrigger > 128));
|
||||||
|
case SSNES_LOAD_STATE_KEY:
|
||||||
|
return ((state[0].Gamepad.sThumbRY > DEADZONE) && (state[0].Gamepad.bRightTrigger > 128));
|
||||||
|
case SSNES_SAVE_STATE_KEY:
|
||||||
|
return ((state[0].Gamepad.sThumbRY < -DEADZONE) && (state[0].Gamepad.bRightTrigger > 128));
|
||||||
|
case SSNES_STATE_SLOT_PLUS:
|
||||||
|
return ((state[0].Gamepad.sThumbRX > DEADZONE) && (state[0].Gamepad.bRightTrigger > 128));
|
||||||
|
case SSNES_STATE_SLOT_MINUS:
|
||||||
|
return ((state[0].Gamepad.sThumbRX < -DEADZONE) && (state[0].Gamepad.bRightTrigger > 128));
|
||||||
|
case SSNES_REWIND:
|
||||||
|
return ((state[0].Gamepad.sThumbRY > DEADZONE) && !(state[0].Gamepad.bRightTrigger > 128));
|
||||||
case SSNES_QUIT_KEY:
|
case SSNES_QUIT_KEY:
|
||||||
g_console.menu_enable = ((state[0].Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB)
|
g_console.menu_enable = ((state[0].Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB)
|
||||||
&& (state[0].Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB));
|
&& (state[0].Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user