(Menu) Allow the user to use volume up/down/mute hotkeys from within the menu
This commit is contained in:
parent
1e035b9385
commit
3bd36941a6
85
runloop.c
85
runloop.c
|
@ -7031,6 +7031,7 @@ static enum runloop_state_enum runloop_check_state(
|
|||
|
||||
old_pressed = pressed;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check if we have pressed the FPS toggle button */
|
||||
HOTKEY_CHECK(RARCH_FPS_TOGGLE, CMD_EVENT_FPS_TOGGLE, true, NULL);
|
||||
|
@ -7040,47 +7041,6 @@ static enum runloop_state_enum runloop_check_state(
|
|||
/* Check if we have pressed the netplay host toggle button */
|
||||
HOTKEY_CHECK(RARCH_NETPLAY_HOST_TOGGLE, CMD_EVENT_NETPLAY_HOST_TOGGLE, true, NULL);
|
||||
|
||||
if (menu_st->alive)
|
||||
{
|
||||
float fastforward_ratio = runloop_get_fastforward_ratio(settings,
|
||||
&runloop_st->fastmotion_override.current);
|
||||
|
||||
if (!settings->bools.menu_throttle_framerate && !fastforward_ratio)
|
||||
return RUNLOOP_STATE_MENU_ITERATE;
|
||||
|
||||
return RUNLOOP_STATE_END;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_ALLOW_PAUSE, NULL))
|
||||
#endif
|
||||
if (pause_nonactive)
|
||||
focused = is_focused;
|
||||
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
/* Check if we have pressed the screenshot toggle button */
|
||||
HOTKEY_CHECK(RARCH_SCREENSHOT, CMD_EVENT_TAKE_SCREENSHOT, true, NULL);
|
||||
#endif
|
||||
|
||||
/* Check if we have pressed the audio mute toggle button */
|
||||
HOTKEY_CHECK(RARCH_MUTE, CMD_EVENT_AUDIO_MUTE_TOGGLE, true, NULL);
|
||||
|
||||
/* Check if we have pressed the OSK toggle button */
|
||||
HOTKEY_CHECK(RARCH_OSK, CMD_EVENT_OSK_TOGGLE, true, NULL);
|
||||
|
||||
/* Check if we have pressed the recording toggle button */
|
||||
HOTKEY_CHECK(RARCH_RECORDING_TOGGLE, CMD_EVENT_RECORDING_TOGGLE, true, NULL);
|
||||
|
||||
/* Check if we have pressed the streaming toggle button */
|
||||
HOTKEY_CHECK(RARCH_STREAMING_TOGGLE, CMD_EVENT_STREAMING_TOGGLE, true, NULL);
|
||||
|
||||
/* Check if we have pressed the Run-Ahead toggle button */
|
||||
HOTKEY_CHECK(RARCH_RUNAHEAD_TOGGLE, CMD_EVENT_RUNAHEAD_TOGGLE, true, NULL);
|
||||
|
||||
/* Check if we have pressed the AI Service toggle button */
|
||||
HOTKEY_CHECK(RARCH_AI_SERVICE, CMD_EVENT_AI_SERVICE_TOGGLE, true, NULL);
|
||||
|
||||
/* Volume stepping + acceleration */
|
||||
{
|
||||
static unsigned volume_hotkey_delay = 0;
|
||||
|
@ -7115,6 +7075,49 @@ static enum runloop_state_enum runloop_check_state(
|
|||
}
|
||||
}
|
||||
|
||||
/* Check if we have pressed the audio mute toggle button */
|
||||
HOTKEY_CHECK(RARCH_MUTE, CMD_EVENT_AUDIO_MUTE_TOGGLE, true, NULL);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
if (menu_st->alive)
|
||||
{
|
||||
float fastforward_ratio = runloop_get_fastforward_ratio(settings,
|
||||
&runloop_st->fastmotion_override.current);
|
||||
|
||||
if (!settings->bools.menu_throttle_framerate && !fastforward_ratio)
|
||||
return RUNLOOP_STATE_MENU_ITERATE;
|
||||
|
||||
return RUNLOOP_STATE_END;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_ALLOW_PAUSE, NULL))
|
||||
#endif
|
||||
if (pause_nonactive)
|
||||
focused = is_focused;
|
||||
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
/* Check if we have pressed the screenshot toggle button */
|
||||
HOTKEY_CHECK(RARCH_SCREENSHOT, CMD_EVENT_TAKE_SCREENSHOT, true, NULL);
|
||||
#endif
|
||||
|
||||
/* Check if we have pressed the OSK toggle button */
|
||||
HOTKEY_CHECK(RARCH_OSK, CMD_EVENT_OSK_TOGGLE, true, NULL);
|
||||
|
||||
/* Check if we have pressed the recording toggle button */
|
||||
HOTKEY_CHECK(RARCH_RECORDING_TOGGLE, CMD_EVENT_RECORDING_TOGGLE, true, NULL);
|
||||
|
||||
/* Check if we have pressed the streaming toggle button */
|
||||
HOTKEY_CHECK(RARCH_STREAMING_TOGGLE, CMD_EVENT_STREAMING_TOGGLE, true, NULL);
|
||||
|
||||
/* Check if we have pressed the Run-Ahead toggle button */
|
||||
HOTKEY_CHECK(RARCH_RUNAHEAD_TOGGLE, CMD_EVENT_RUNAHEAD_TOGGLE, true, NULL);
|
||||
|
||||
/* Check if we have pressed the AI Service toggle button */
|
||||
HOTKEY_CHECK(RARCH_AI_SERVICE, CMD_EVENT_AI_SERVICE_TOGGLE, true, NULL);
|
||||
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
/* Check Netplay */
|
||||
HOTKEY_CHECK(RARCH_NETPLAY_PING_TOGGLE, CMD_EVENT_NETPLAY_PING_TOGGLE, true, NULL);
|
||||
|
|
Loading…
Reference in New Issue