(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)
|
static void check_stateslots(bool pressed_increase, bool pressed_decrease)
|
||||||
{
|
{
|
||||||
/* Save state slots */
|
/* Save state slots */
|
||||||
if (pressed_increase)
|
if (pressed_increase)
|
||||||
{
|
|
||||||
g_settings.state_slot++;
|
g_settings.state_slot++;
|
||||||
state_slot();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pressed_decrease)
|
if (pressed_decrease)
|
||||||
{
|
{
|
||||||
if (g_settings.state_slot > 0)
|
if (g_settings.state_slot > 0)
|
||||||
g_settings.state_slot--;
|
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…
Reference in New Issue