mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Add enums for gamepad menu toggle combos
This commit is contained in:
parent
54192cb6d6
commit
d77dd4f0d3
@ -573,9 +573,9 @@ static unsigned default_menu_btn_scroll_down = RETRO_DEVICE_ID_JOYPAD_R;
|
||||
static unsigned default_menu_btn_scroll_up = RETRO_DEVICE_ID_JOYPAD_L;
|
||||
|
||||
#if defined(__CELLOS_LV2__) || defined(_XBOX1) || defined(_XBOX360)
|
||||
static unsigned menu_toggle_gamepad_combo = 2;
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L3_R3;
|
||||
#else
|
||||
static unsigned menu_toggle_gamepad_combo = 0;
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_NONE;
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
|
@ -49,6 +49,15 @@ enum input_device_type
|
||||
INPUT_DEVICE_TYPE_JOYPAD
|
||||
};
|
||||
|
||||
enum input_toggle_type
|
||||
{
|
||||
INPUT_TOGGLE_NONE = 0,
|
||||
INPUT_TOGGLE_DOWN_Y_L_R,
|
||||
INPUT_TOGGLE_L3_R3,
|
||||
INPUT_TOGGLE_START_SELECT,
|
||||
INPUT_TOGGLE_LAST
|
||||
};
|
||||
|
||||
struct retro_keybind
|
||||
{
|
||||
bool valid;
|
||||
|
@ -320,9 +320,9 @@ static bool runloop_cmd_get_state_menu_toggle_button_combo(
|
||||
{
|
||||
switch (settings->input.menu_toggle_gamepad_combo)
|
||||
{
|
||||
case 0:
|
||||
case INPUT_TOGGLE_NONE:
|
||||
return false;
|
||||
case 1:
|
||||
case INPUT_TOGGLE_DOWN_Y_L_R:
|
||||
if (!BIT64_GET(input.state, RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
return false;
|
||||
if (!BIT64_GET(input.state, RETRO_DEVICE_ID_JOYPAD_Y))
|
||||
@ -332,13 +332,13 @@ static bool runloop_cmd_get_state_menu_toggle_button_combo(
|
||||
if (!BIT64_GET(input.state, RETRO_DEVICE_ID_JOYPAD_R))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
case INPUT_TOGGLE_L3_R3:
|
||||
if (!BIT64_GET(input.state, RETRO_DEVICE_ID_JOYPAD_L3))
|
||||
return false;
|
||||
if (!BIT64_GET(input.state, RETRO_DEVICE_ID_JOYPAD_R3))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
case INPUT_TOGGLE_START_SELECT:
|
||||
if (!BIT64_GET(input.state, RETRO_DEVICE_ID_JOYPAD_START))
|
||||
return false;
|
||||
if (!BIT64_GET(input.state, RETRO_DEVICE_ID_JOYPAD_SELECT))
|
||||
|
Loading…
x
Reference in New Issue
Block a user