mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +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_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_quit_key_func(input) BIND_PRESSED(input, RARCH_QUIT_KEY)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -329,8 +329,7 @@ bool menu_iterate(void)
|
||||
#endif
|
||||
check_fullscreen_func(input, old_state);
|
||||
|
||||
if (BIND_PRESSED(input, RARCH_QUIT_KEY)
|
||||
|| !driver.video->alive(driver.video_data))
|
||||
if (check_quit_key_func(input) || !driver.video->alive(driver.video_data))
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_RESUME);
|
||||
return false;
|
||||
|
@ -3599,8 +3599,7 @@ bool rarch_main_iterate(void)
|
||||
return false;
|
||||
|
||||
/* Time to drop? */
|
||||
if (BIND_PRESSED(input, RARCH_QUIT_KEY) ||
|
||||
!driver.video->alive(driver.video_data))
|
||||
if (check_quit_key_func(input) || !driver.video->alive(driver.video_data))
|
||||
return false;
|
||||
|
||||
if (check_enter_menu_func(input, old_input))
|
||||
|
Loading…
x
Reference in New Issue
Block a user