mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-07 02:47:24 +00:00
(runloop.c) Expand check_stateslots
This commit is contained in:
parent
17f9d08190
commit
acd33a0212
36
runloop.c
36
runloop.c
@ -218,36 +218,32 @@ static void check_fast_forward_button(bool fastforward_pressed,
|
||||
}
|
||||
}
|
||||
|
||||
static void state_slot(void)
|
||||
{
|
||||
char msg[PATH_MAX];
|
||||
|
||||
if (g_extern.msg_queue)
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
|
||||
snprintf(msg, sizeof(msg), "State slot: %d",
|
||||
g_settings.state_slot);
|
||||
|
||||
if (g_extern.msg_queue)
|
||||
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
|
||||
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
|
||||
static void check_stateslots(bool pressed_increase, bool pressed_decrease)
|
||||
{
|
||||
/* Save state slots */
|
||||
if (pressed_increase)
|
||||
{
|
||||
g_settings.state_slot++;
|
||||
state_slot();
|
||||
}
|
||||
|
||||
if (pressed_decrease)
|
||||
{
|
||||
if (g_settings.state_slot > 0)
|
||||
g_settings.state_slot--;
|
||||
state_slot();
|
||||
}
|
||||
|
||||
if (pressed_increase || pressed_decrease)
|
||||
{
|
||||
char msg[PATH_MAX];
|
||||
|
||||
if (g_extern.msg_queue)
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
|
||||
snprintf(msg, sizeof(msg), "State slot: %d",
|
||||
g_settings.state_slot);
|
||||
|
||||
if (g_extern.msg_queue)
|
||||
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
|
||||
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user