mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +00:00
Control flow change for RGUI/RMENU - no longer have to invoke RARCH_QUIT_KEY to toggle menu
This commit is contained in:
parent
f921f628d9
commit
a23bc3a13f
@ -467,11 +467,6 @@ static void android_input_poll(void *data)
|
|||||||
else if (ident == LOOPER_ID_MAIN)
|
else if (ident == LOOPER_ID_MAIN)
|
||||||
engine_handle_cmd();
|
engine_handle_cmd();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(g_extern.frame_count < g_extern.delay_timer[0]) && g_extern.lifecycle_state & (1ULL << RARCH_RMENU_TOGGLE))
|
|
||||||
{
|
|
||||||
g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int16_t android_input_state(void *data, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned index, unsigned id)
|
static int16_t android_input_state(void *data, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned index, unsigned id)
|
||||||
|
@ -528,10 +528,7 @@ static void gx_input_poll(void *data)
|
|||||||
| GX_CLASSIC_HOME
|
| GX_CLASSIC_HOME
|
||||||
#endif
|
#endif
|
||||||
))
|
))
|
||||||
{
|
|
||||||
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
|
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
|
||||||
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,14 +210,11 @@ static void ps3_input_poll(void *data)
|
|||||||
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
||||||
{
|
{
|
||||||
if ((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
if ((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||||
{
|
|
||||||
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
|
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
|
||||||
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
|
|
||||||
}
|
|
||||||
if (!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
if (!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||||
{
|
{
|
||||||
|
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
|
||||||
*lifecycle_state |= (1ULL << RARCH_RMENU_QUICKMENU_TOGGLE);
|
*lifecycle_state |= (1ULL << RARCH_RMENU_QUICKMENU_TOGGLE);
|
||||||
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
27
retroarch.c
27
retroarch.c
@ -2793,25 +2793,26 @@ bool rarch_main_iterate(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Time to drop?
|
// Time to drop?
|
||||||
if (input_key_pressed_func(RARCH_QUIT_KEY) ||
|
if (input_key_pressed_func(RARCH_QUIT_KEY) || !video_alive_func())
|
||||||
!video_alive_func())
|
|
||||||
{
|
{
|
||||||
#ifdef HAVE_RMENU
|
#ifdef HAVE_RMENU
|
||||||
bool rmenu_enable = input_key_pressed_func(RARCH_RMENU_TOGGLE);
|
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXIT);
|
||||||
if (input_key_pressed_func(RARCH_RMENU_QUICKMENU_TOGGLE))
|
|
||||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME);
|
|
||||||
|
|
||||||
if (rmenu_enable || ((g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_INGAME)) && !rmenu_enable))
|
|
||||||
{
|
|
||||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU);
|
|
||||||
g_extern.delay_timer[0] = g_extern.frame_count + 30;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXIT);
|
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_RMENU
|
||||||
|
if (input_key_pressed_func(RARCH_RMENU_TOGGLE))
|
||||||
|
{
|
||||||
|
if (input_key_pressed_func(RARCH_RMENU_QUICKMENU_TOGGLE))
|
||||||
|
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;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_COMMAND
|
#ifdef HAVE_COMMAND
|
||||||
if (driver.command)
|
if (driver.command)
|
||||||
rarch_cmd_pre_frame(driver.command);
|
rarch_cmd_pre_frame(driver.command);
|
||||||
|
@ -231,14 +231,11 @@ static void xdk_input_poll(void *data)
|
|||||||
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
if (!(g_extern.frame_count < g_extern.delay_timer[0]))
|
||||||
{
|
{
|
||||||
if((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
if((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||||
{
|
|
||||||
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
|
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
|
||||||
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
|
|
||||||
}
|
|
||||||
if(!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
if(!(*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||||
{
|
{
|
||||||
|
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
|
||||||
*lifecycle_state |= (1ULL << RARCH_RMENU_QUICKMENU_TOGGLE);
|
*lifecycle_state |= (1ULL << RARCH_RMENU_QUICKMENU_TOGGLE);
|
||||||
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user