mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-30 08:02:22 +00:00
(Menu/XDK) Take out no longer needed separate menu binds
This commit is contained in:
parent
678c7b2649
commit
d3c09a30f6
@ -285,49 +285,6 @@ static void xdk_input_poll(void *data)
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
}
|
||||
|
||||
static bool xdk_menu_input_state(uint64_t joykey, uint64_t state)
|
||||
{
|
||||
switch (joykey)
|
||||
{
|
||||
case CONSOLE_MENU_A:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_A);
|
||||
case CONSOLE_MENU_B:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_B);
|
||||
case CONSOLE_MENU_X:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_X);
|
||||
case CONSOLE_MENU_Y:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_Y);
|
||||
case CONSOLE_MENU_START:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_START);
|
||||
case CONSOLE_MENU_SELECT:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_SELECT);
|
||||
case CONSOLE_MENU_UP:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_UP);
|
||||
case CONSOLE_MENU_DOWN:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN);
|
||||
case CONSOLE_MENU_LEFT:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT);
|
||||
case CONSOLE_MENU_RIGHT:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
||||
case CONSOLE_MENU_L:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_L);
|
||||
case CONSOLE_MENU_R:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_R);
|
||||
case CONSOLE_MENU_HOME:
|
||||
return (state & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (state & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3));
|
||||
case CONSOLE_MENU_L2:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_L2);
|
||||
case CONSOLE_MENU_R2:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_R2);
|
||||
case CONSOLE_MENU_L3:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3);
|
||||
case CONSOLE_MENU_R3:
|
||||
return state & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static int16_t xdk_input_state(void *data, const struct retro_keybind **binds,
|
||||
unsigned port, unsigned device,
|
||||
unsigned index, unsigned id)
|
||||
@ -340,10 +297,7 @@ static int16_t xdk_input_state(void *data, const struct retro_keybind **binds,
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
if (binds[port][id].joykey >= CONSOLE_MENU_FIRST && binds[port][id].joykey <= CONSOLE_MENU_LAST)
|
||||
return xdk_menu_input_state(binds[port][id].joykey, xdk->pad_state[port]) ? 1 : 0;
|
||||
else
|
||||
return input_joypad_pressed(&xdk_joypad, port, binds[port], id);
|
||||
return input_joypad_pressed(&xdk_joypad, port, binds[port], id);
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
return input_joypad_analog(&xdk_joypad, port, index, id, binds[port]);
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user