mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-26 14:45:45 +00:00
runloop.c - Simplify check_fast_forward_button
This commit is contained in:
parent
40d97184b3
commit
3dd290e4f6
14
runloop.c
14
runloop.c
@ -29,9 +29,7 @@ static void check_mute(void)
|
|||||||
const char *msg = !g_extern.audio_data.mute ?
|
const char *msg = !g_extern.audio_data.mute ?
|
||||||
"Audio muted." : "Audio unmuted.";
|
"Audio muted." : "Audio unmuted.";
|
||||||
|
|
||||||
if (!driver.audio_data)
|
if (!driver.audio_data || !driver.audio_active)
|
||||||
return;
|
|
||||||
if (!driver.audio_active)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_extern.audio_data.mute = !g_extern.audio_data.mute;
|
g_extern.audio_data.mute = !g_extern.audio_data.mute;
|
||||||
@ -152,15 +150,13 @@ static void check_fast_forward_button(bool fastforward_pressed,
|
|||||||
bool hold_pressed, bool old_hold_pressed)
|
bool hold_pressed, bool old_hold_pressed)
|
||||||
{
|
{
|
||||||
if (fastforward_pressed)
|
if (fastforward_pressed)
|
||||||
{
|
|
||||||
driver.nonblock_state = !driver.nonblock_state;
|
driver.nonblock_state = !driver.nonblock_state;
|
||||||
driver_set_nonblock_state(driver.nonblock_state);
|
|
||||||
}
|
|
||||||
else if (old_hold_pressed != hold_pressed)
|
else if (old_hold_pressed != hold_pressed)
|
||||||
{
|
|
||||||
driver.nonblock_state = hold_pressed;
|
driver.nonblock_state = hold_pressed;
|
||||||
driver_set_nonblock_state(driver.nonblock_state);
|
else
|
||||||
}
|
return;
|
||||||
|
|
||||||
|
driver_set_nonblock_state(driver.nonblock_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_stateslots(bool pressed_increase, bool pressed_decrease)
|
static void check_stateslots(bool pressed_increase, bool pressed_decrease)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user