mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
Make audio_driver_callback and audio_driver_callback_set_state
more robust
This commit is contained in:
parent
4ac38a738f
commit
c6992b3a6a
@ -884,11 +884,17 @@ bool audio_driver_has_callback(void)
|
||||
void audio_driver_callback(void)
|
||||
{
|
||||
if (audio_driver_has_callback())
|
||||
audio_data.audio_callback.callback();
|
||||
{
|
||||
if (audio_data.audio_callback.callback)
|
||||
audio_data.audio_callback.callback();
|
||||
}
|
||||
}
|
||||
|
||||
void audio_driver_callback_set_state(bool state)
|
||||
{
|
||||
if (audio_driver_has_callback())
|
||||
audio_data.audio_callback.set_state(state);
|
||||
{
|
||||
if (audio_data.audio_callback.set_state)
|
||||
audio_data.audio_callback.set_state(state);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user