mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
check_mute - go through rarch_main_command instead of directly
calling driver.audio
This commit is contained in:
parent
6086b411cb
commit
34f3c7d22e
@ -2283,9 +2283,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
driver.audio->stop(driver.audio_data);
|
||||
break;
|
||||
case RARCH_CMD_AUDIO_START:
|
||||
if (!driver.audio_data)
|
||||
return false;
|
||||
if (driver.audio->alive(driver.audio_data))
|
||||
if (!driver.audio_data || driver.audio->alive(driver.audio_data))
|
||||
return false;
|
||||
|
||||
if (!g_extern.audio_data.mute
|
||||
|
@ -38,8 +38,8 @@ static void check_mute(void)
|
||||
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
|
||||
|
||||
if (g_extern.audio_data.mute)
|
||||
driver.audio->stop(driver.audio_data);
|
||||
else if (!driver.audio->start(driver.audio_data))
|
||||
rarch_main_command(RARCH_CMD_AUDIO_STOP);
|
||||
else if (!rarch_main_command(RARCH_CMD_AUDIO_START))
|
||||
{
|
||||
RARCH_ERR("Failed to unmute audio.\n");
|
||||
driver.audio_active = false;
|
||||
|
Loading…
Reference in New Issue
Block a user