mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Hide away last BIND_PRESSED invocations with check_quit_key_func
This commit is contained in:
parent
f7061e7233
commit
82806dcd85
1
driver.h
1
driver.h
@ -689,6 +689,7 @@ extern menu_ctx_driver_backend_t menu_ctx_backend_lakka;
|
|||||||
#define check_stateslots_func(input, old_input) check_stateslots(BIND_PRESSED(input, RARCH_STATE_SLOT_PLUS), BIND_PRESSED(old_input, RARCH_STATE_SLOT_PLUS), BIND_PRESSED(input, RARCH_STATE_SLOT_MINUS), BIND_PRESSED(old_input, RARCH_STATE_SLOT_MINUS))
|
#define check_stateslots_func(input, old_input) check_stateslots(BIND_PRESSED(input, RARCH_STATE_SLOT_PLUS), BIND_PRESSED(old_input, RARCH_STATE_SLOT_PLUS), BIND_PRESSED(input, RARCH_STATE_SLOT_MINUS), BIND_PRESSED(old_input, RARCH_STATE_SLOT_MINUS))
|
||||||
#define check_savestates_func(input, old_input) check_savestates(BIND_PRESSED(input, RARCH_SAVE_STATE_KEY), BIND_PRESSED(old_input, RARCH_SAVE_STATE_KEY), BIND_PRESSED(input, RARCH_LOAD_STATE_KEY), BIND_PRESSED(old_input, RARCH_LOAD_STATE_KEY), g_extern.bsv.movie)
|
#define check_savestates_func(input, old_input) check_savestates(BIND_PRESSED(input, RARCH_SAVE_STATE_KEY), BIND_PRESSED(old_input, RARCH_SAVE_STATE_KEY), BIND_PRESSED(input, RARCH_LOAD_STATE_KEY), BIND_PRESSED(old_input, RARCH_LOAD_STATE_KEY), g_extern.bsv.movie)
|
||||||
#define check_pause_func(input, old_input) check_pause(BIND_PRESSED(input, RARCH_PAUSE_TOGGLE), BIND_PRESSED(old_input, RARCH_PAUSE_TOGGLE), BIND_PRESSED(input, RARCH_FRAMEADVANCE))
|
#define check_pause_func(input, old_input) check_pause(BIND_PRESSED(input, RARCH_PAUSE_TOGGLE), BIND_PRESSED(old_input, RARCH_PAUSE_TOGGLE), BIND_PRESSED(input, RARCH_FRAMEADVANCE))
|
||||||
|
#define check_quit_key_func(input) BIND_PRESSED(input, RARCH_QUIT_KEY)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -329,8 +329,7 @@ bool menu_iterate(void)
|
|||||||
#endif
|
#endif
|
||||||
check_fullscreen_func(input, old_state);
|
check_fullscreen_func(input, old_state);
|
||||||
|
|
||||||
if (BIND_PRESSED(input, RARCH_QUIT_KEY)
|
if (check_quit_key_func(input) || !driver.video->alive(driver.video_data))
|
||||||
|| !driver.video->alive(driver.video_data))
|
|
||||||
{
|
{
|
||||||
rarch_main_command(RARCH_CMD_RESUME);
|
rarch_main_command(RARCH_CMD_RESUME);
|
||||||
return false;
|
return false;
|
||||||
|
@ -3599,8 +3599,7 @@ bool rarch_main_iterate(void)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Time to drop? */
|
/* Time to drop? */
|
||||||
if (BIND_PRESSED(input, RARCH_QUIT_KEY) ||
|
if (check_quit_key_func(input) || !driver.video->alive(driver.video_data))
|
||||||
!driver.video->alive(driver.video_data))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (check_enter_menu_func(input, old_input))
|
if (check_enter_menu_func(input, old_input))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user