Cleanup retroarch_menu_running_finished

This commit is contained in:
twinaphex 2021-04-10 21:04:00 +02:00
parent c392a475ee
commit 59449600ad

View File

@ -35536,8 +35536,9 @@ void retroarch_menu_running_finished(bool quit)
* (for a single frame) */
p_rarch->input_driver_flushing_input = 1;
#ifdef HAVE_AUDIOMIXER
if (!quit)
{
#ifdef HAVE_AUDIOMIXER
/* Stop menu background music before we exit the menu */
if ( settings &&
settings->bools.audio_enable_menu &&
@ -35546,19 +35547,20 @@ void retroarch_menu_running_finished(bool quit)
audio_driver_mixer_stop_stream(AUDIO_MIXER_SYSTEM_SLOT_BGM);
#endif
/* Enable game focus mode, if required */
if (!quit && (p_rarch->current_core_type != CORE_TYPE_DUMMY))
{
enum input_auto_game_focus_type auto_game_focus_type = settings ?
(enum input_auto_game_focus_type)settings->uints.input_auto_game_focus :
AUTO_GAME_FOCUS_OFF;
if ((auto_game_focus_type == AUTO_GAME_FOCUS_ON) ||
((auto_game_focus_type == AUTO_GAME_FOCUS_DETECT) &&
p_rarch->game_focus_state.core_requested))
/* Enable game focus mode, if required */
if (p_rarch->current_core_type != CORE_TYPE_DUMMY)
{
enum input_game_focus_cmd_type game_focus_cmd = GAME_FOCUS_CMD_ON;
command_event(CMD_EVENT_GAME_FOCUS_TOGGLE, &game_focus_cmd);
enum input_auto_game_focus_type auto_game_focus_type = settings ?
(enum input_auto_game_focus_type)settings->uints.input_auto_game_focus :
AUTO_GAME_FOCUS_OFF;
if ((auto_game_focus_type == AUTO_GAME_FOCUS_ON) ||
((auto_game_focus_type == AUTO_GAME_FOCUS_DETECT) &&
p_rarch->game_focus_state.core_requested))
{
enum input_game_focus_cmd_type game_focus_cmd = GAME_FOCUS_CMD_ON;
command_event(CMD_EVENT_GAME_FOCUS_TOGGLE, &game_focus_cmd);
}
}
}