mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-26 17:50:56 +00:00
Menu: Trigger scroll home+end on keyup (#17171)
Some checks are pending
CI 3DS / build (push) Waiting to run
CI Android / build (push) Waiting to run
CI DOS/DJGPP / build (push) Waiting to run
CI Emscripten / build (push) Waiting to run
CI GameCube / build (push) Waiting to run
CI Linux (i686) / build (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, UWP) (push) Waiting to run
CI Windows (MSVC) / msvc (ReleaseAngle, x64, UWP) (push) Waiting to run
CI macOS / build (push) Waiting to run
CI Miyoo ARM32 / build (push) Waiting to run
CI PS2 / build (push) Waiting to run
CI PS4/ORBIS / build (push) Waiting to run
CI PSP / build (push) Waiting to run
CI PSVita / build (push) Waiting to run
CI RS90 Odbeta MIPS32 / build (push) Waiting to run
CI RetroFW MIPS32 / build (push) Waiting to run
CI Switch/libnx / build (push) Waiting to run
CI Wii / build (push) Waiting to run
CI WiiU / build (push) Waiting to run
CI Windows i686 (MXE) / build (push) Waiting to run
CI Windows x64 (MXE) / build (push) Waiting to run
RetroArch CI / linux-c89 (push) Waiting to run
CI webOS / build (push) Waiting to run
Some checks are pending
CI 3DS / build (push) Waiting to run
CI Android / build (push) Waiting to run
CI DOS/DJGPP / build (push) Waiting to run
CI Emscripten / build (push) Waiting to run
CI GameCube / build (push) Waiting to run
CI Linux (i686) / build (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Debug, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2019) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, 2022) (push) Waiting to run
CI Windows (MSVC) / msvc (Release, x64, UWP) (push) Waiting to run
CI Windows (MSVC) / msvc (ReleaseAngle, x64, UWP) (push) Waiting to run
CI macOS / build (push) Waiting to run
CI Miyoo ARM32 / build (push) Waiting to run
CI PS2 / build (push) Waiting to run
CI PS4/ORBIS / build (push) Waiting to run
CI PSP / build (push) Waiting to run
CI PSVita / build (push) Waiting to run
CI RS90 Odbeta MIPS32 / build (push) Waiting to run
CI RetroFW MIPS32 / build (push) Waiting to run
CI Switch/libnx / build (push) Waiting to run
CI Wii / build (push) Waiting to run
CI WiiU / build (push) Waiting to run
CI Windows i686 (MXE) / build (push) Waiting to run
CI Windows x64 (MXE) / build (push) Waiting to run
RetroArch CI / linux-c89 (push) Waiting to run
CI webOS / build (push) Waiting to run
This commit is contained in:
parent
e45bc853ec
commit
522efc333c
@ -5571,6 +5571,7 @@ unsigned menu_event(
|
||||
else
|
||||
{
|
||||
static uint8_t switch_old = 0;
|
||||
static bool down[MENU_ACTION_TOGGLE] = {false};
|
||||
uint8_t switch_current = BIT256_GET_PTR(p_input, RETRO_DEVICE_ID_JOYPAD_LEFT)
|
||||
| BIT256_GET_PTR(p_input, RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
||||
uint8_t switch_trigger = switch_current & ~switch_old;
|
||||
@ -5646,11 +5647,24 @@ unsigned menu_event(
|
||||
menu_st->scroll.mode = (swap_scroll_btns) ? MENU_SCROLL_PAGE : MENU_SCROLL_START_LETTER;
|
||||
ret = MENU_ACTION_SCROLL_DOWN;
|
||||
}
|
||||
if (BIT256_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_L3))
|
||||
|
||||
if (BIT256_GET_PTR(p_input, RETRO_DEVICE_ID_JOYPAD_L3))
|
||||
down[MENU_ACTION_SCROLL_HOME] = true;
|
||||
else if (down[MENU_ACTION_SCROLL_HOME])
|
||||
{
|
||||
down[MENU_ACTION_SCROLL_HOME] = false;
|
||||
ret = MENU_ACTION_SCROLL_HOME;
|
||||
else if (BIT256_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_R3))
|
||||
}
|
||||
|
||||
if (BIT256_GET_PTR(p_input, RETRO_DEVICE_ID_JOYPAD_R3))
|
||||
down[MENU_ACTION_SCROLL_END] = true;
|
||||
else if (down[MENU_ACTION_SCROLL_END])
|
||||
{
|
||||
down[MENU_ACTION_SCROLL_END] = false;
|
||||
ret = MENU_ACTION_SCROLL_END;
|
||||
else if (ok_trigger)
|
||||
}
|
||||
|
||||
if (ok_trigger)
|
||||
ret = MENU_ACTION_OK;
|
||||
else if (BIT256_GET_PTR(p_trigger_input, menu_cancel_btn))
|
||||
ret = MENU_ACTION_CANCEL;
|
||||
|
Loading…
Reference in New Issue
Block a user