Cleanups
This commit is contained in:
parent
a52b6a2c16
commit
9dde33b5c1
23
retroarch.c
23
retroarch.c
|
@ -3080,38 +3080,33 @@ static enum runloop_state runloop_check_state(
|
||||||
current_input, RARCH_STATE_SLOT_PLUS);
|
current_input, RARCH_STATE_SLOT_PLUS);
|
||||||
bool should_slot_decrease = BIT256_GET(
|
bool should_slot_decrease = BIT256_GET(
|
||||||
current_input, RARCH_STATE_SLOT_MINUS);
|
current_input, RARCH_STATE_SLOT_MINUS);
|
||||||
|
bool should_set = false;
|
||||||
|
|
||||||
/* Checks if the state increase/decrease keys have been pressed
|
/* Checks if the state increase/decrease keys have been pressed
|
||||||
* for this frame. */
|
* for this frame. */
|
||||||
if (should_slot_increase && !old_should_slot_increase)
|
if (should_slot_increase && !old_should_slot_increase)
|
||||||
{
|
{
|
||||||
char msg[128];
|
|
||||||
int new_state_slot = settings->ints.state_slot + 1;
|
int new_state_slot = settings->ints.state_slot + 1;
|
||||||
|
|
||||||
msg[0] = '\0';
|
|
||||||
|
|
||||||
configuration_set_int(settings, settings->ints.state_slot, new_state_slot);
|
configuration_set_int(settings, settings->ints.state_slot, new_state_slot);
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), "%s: %d",
|
should_set = true;
|
||||||
msg_hash_to_str(MSG_STATE_SLOT),
|
|
||||||
settings->ints.state_slot);
|
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 2, 180, true);
|
|
||||||
|
|
||||||
RARCH_LOG("%s\n", msg);
|
|
||||||
}
|
}
|
||||||
else if (should_slot_decrease && !old_should_slot_decrease)
|
else if (should_slot_decrease && !old_should_slot_decrease)
|
||||||
{
|
{
|
||||||
char msg[128];
|
|
||||||
int new_state_slot = settings->ints.state_slot - 1;
|
int new_state_slot = settings->ints.state_slot - 1;
|
||||||
|
|
||||||
msg[0] = '\0';
|
|
||||||
|
|
||||||
if (settings->ints.state_slot > 0)
|
if (settings->ints.state_slot > 0)
|
||||||
{
|
|
||||||
configuration_set_int(settings, settings->ints.state_slot, new_state_slot);
|
configuration_set_int(settings, settings->ints.state_slot, new_state_slot);
|
||||||
|
|
||||||
|
should_set = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (should_set)
|
||||||
|
{
|
||||||
|
char msg[128];
|
||||||
|
msg[0] = '\0';
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), "%s: %d",
|
snprintf(msg, sizeof(msg), "%s: %d",
|
||||||
msg_hash_to_str(MSG_STATE_SLOT),
|
msg_hash_to_str(MSG_STATE_SLOT),
|
||||||
settings->ints.state_slot);
|
settings->ints.state_slot);
|
||||||
|
|
Loading…
Reference in New Issue