mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-19 07:16:21 +00:00
Revert "Menu toggle without delay timers (more testing might be needed -"
This reverts commit 54a6175a555925d8a3530756b1fa6c9a7b14adc2.
This commit is contained in:
parent
edf600e0c7
commit
039fc644d5
@ -1631,16 +1631,16 @@ static int menu_input_process(void *data, void *state)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static bool old_rmenu_toggle = true;
|
||||
bool rmenu_toggle = ((trigger_state & (1ULL << GX_DEVICE_NAV_MENU)) && g_extern.main_is_init);
|
||||
if (rmenu_toggle && !old_rmenu_toggle)
|
||||
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
|
||||
old_rmenu_toggle = true;
|
||||
return -1;
|
||||
bool return_to_game_enable = ((trigger_state & (1ULL << GX_DEVICE_NAV_MENU)) && g_extern.main_is_init);
|
||||
|
||||
if (return_to_game_enable)
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
old_rmenu_toggle = rmenu_toggle;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1788,6 +1788,11 @@ bool menu_iterate(void)
|
||||
return true;
|
||||
|
||||
deinit:
|
||||
// set a timer delay so that we don't instantly switch back to the menu when
|
||||
// press and holding QUIT in the emulation loop (lasts for 30 frame ticks)
|
||||
if (!(g_extern.lifecycle_state & (1ULL << RARCH_FRAMEADVANCE)))
|
||||
g_extern.delay_timer[0] = g_extern.frame_count + 30;
|
||||
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_DRAW);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_INGAME);
|
||||
|
||||
|
@ -2709,18 +2709,19 @@ int menu_input_process(void *data, void *state)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static bool old_rmenu_toggle = true;
|
||||
bool rmenu_toggle = (((rstate->old_state & (1ULL << RMENU_DEVICE_NAV_L3))
|
||||
&& (rstate->old_state & (1ULL << RMENU_DEVICE_NAV_R3))
|
||||
&& g_extern.main_is_init));
|
||||
if (rmenu_toggle && !old_rmenu_toggle)
|
||||
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
|
||||
old_rmenu_toggle = true;
|
||||
return -1;
|
||||
bool return_to_game_enable = (((rstate->old_state & (1ULL << RMENU_DEVICE_NAV_L3)) && (rstate->old_state & (1ULL << RMENU_DEVICE_NAV_R3)) && g_extern.main_is_init));
|
||||
|
||||
if (return_to_game_enable)
|
||||
{
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_INGAME)))
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
old_rmenu_toggle = rmenu_toggle;
|
||||
|
||||
bool quit, resize;
|
||||
unsigned width, height, frame_count;
|
||||
@ -2888,6 +2889,11 @@ bool menu_iterate(void)
|
||||
return true;
|
||||
|
||||
deinit:
|
||||
// set a timer delay so that we don't instantly switch back to the menu when
|
||||
// press and holding L3 + R3 in the emulation loop (lasts for 30 frame ticks)
|
||||
if (!(g_extern.lifecycle_state & (1ULL << RARCH_FRAMEADVANCE)))
|
||||
g_extern.delay_timer[0] = g_extern.frame_count + 30;
|
||||
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_DRAW);
|
||||
|
||||
#ifndef __CELLOS_LV2__
|
||||
|
@ -1499,19 +1499,19 @@ bool menu_iterate(void)
|
||||
process_input_ret = -1;
|
||||
}
|
||||
|
||||
static bool old_rmenu_toggle = true;
|
||||
bool rmenu_toggle = ((state.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB)
|
||||
&& (state.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB)
|
||||
&& (g_extern.main_is_init));
|
||||
|
||||
if (rmenu_toggle && !old_rmenu_toggle)
|
||||
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
|
||||
old_rmenu_toggle = true;
|
||||
process_input_ret = -1;
|
||||
bool rmenu_enable = ((state.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB)
|
||||
&& (state.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB) && (g_extern.main_is_init));
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU))
|
||||
if (rmenu_enable)
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
|
||||
process_input_ret = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
old_rmenu_toggle = rmenu_toggle;
|
||||
|
||||
rarch_render_cached_frame();
|
||||
|
||||
@ -1543,6 +1543,11 @@ bool menu_iterate(void)
|
||||
return true;
|
||||
|
||||
deinit:
|
||||
// set a timer delay so that we don't instantly switch back to the menu when
|
||||
// press and holding L3 + R3 in the emulation loop (lasts for 30 frame ticks)
|
||||
if(!(g_extern.lifecycle_state & (1ULL << RARCH_FRAMEADVANCE)))
|
||||
g_extern.delay_timer[0] = g_extern.frame_count + 30;
|
||||
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_INGAME);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_DRAW);
|
||||
|
||||
|
@ -518,15 +518,18 @@ static void gx_input_poll(void *data)
|
||||
g_quit = false;
|
||||
}
|
||||
|
||||
if (*state_p1 & GX_QUIT_KEY)
|
||||
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
|
||||
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
||||
{
|
||||
if (*state_p1 & GX_QUIT_KEY)
|
||||
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
|
||||
|
||||
if (*state_p1 & (GX_WIIMOTE_HOME
|
||||
if (*state_p1 & (GX_WIIMOTE_HOME
|
||||
#ifdef HW_RVL
|
||||
| GX_CLASSIC_HOME
|
||||
| GX_CLASSIC_HOME
|
||||
#endif
|
||||
))
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
))
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
}
|
||||
}
|
||||
|
||||
static bool gx_input_key_pressed(void *data, int key)
|
||||
|
@ -207,12 +207,15 @@ static void ps3_input_poll(void *data)
|
||||
if ((*state_p1 & (1ULL << RARCH_ANALOG_RIGHT_Y_DPAD_UP)) && !(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R2)))
|
||||
*lifecycle_state |= (1ULL << RARCH_REWIND);
|
||||
|
||||
if ((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
if (!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
||||
{
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_QUICKMENU_TOGGLE);
|
||||
if ((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
if (!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
{
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_QUICKMENU_TOGGLE);
|
||||
}
|
||||
}
|
||||
|
||||
cellPadGetInfo2(&pad_info);
|
||||
|
@ -2858,6 +2858,7 @@ static inline bool check_enter_rgui(void)
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME);
|
||||
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU);
|
||||
g_extern.delay_timer[0] = g_extern.frame_count + 30; // FIXME: Purge. Should do something similar in RGUI as well.
|
||||
old_rmenu_toggle = true;
|
||||
return true;
|
||||
}
|
||||
|
@ -228,12 +228,15 @@ static void xdk_input_poll(void *data)
|
||||
if ((*state_p1 & (1ULL << RARCH_ANALOG_RIGHT_Y_DPAD_UP)) && !(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R2)))
|
||||
*lifecycle_state |= (1ULL << RARCH_REWIND);
|
||||
|
||||
if((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
if(!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
||||
{
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_QUICKMENU_TOGGLE);
|
||||
if((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
if(!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
{
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_QUICKMENU_TOGGLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user