diff --git a/driver.h b/driver.h index 654c216ed3..52dbdf9745 100644 --- a/driver.h +++ b/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 } diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index 0f1db52ac8..758ed06b19 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -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; diff --git a/retroarch.c b/retroarch.c index 80c68264cb..1cb7268cb7 100644 --- a/retroarch.c +++ b/retroarch.c @@ -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))