This commit is contained in:
twinaphex 2018-09-27 14:02:11 +02:00
parent a52b6a2c16
commit 9dde33b5c1
1 changed files with 12 additions and 17 deletions

View File

@ -3080,38 +3080,33 @@ static enum runloop_state runloop_check_state(
current_input, RARCH_STATE_SLOT_PLUS);
bool should_slot_decrease = BIT256_GET(
current_input, RARCH_STATE_SLOT_MINUS);
bool should_set = false;
/* Checks if the state increase/decrease keys have been pressed
* for this frame. */
if (should_slot_increase && !old_should_slot_increase)
{
char msg[128];
int new_state_slot = settings->ints.state_slot + 1;
msg[0] = '\0';
configuration_set_int(settings, settings->ints.state_slot, new_state_slot);
snprintf(msg, sizeof(msg), "%s: %d",
msg_hash_to_str(MSG_STATE_SLOT),
settings->ints.state_slot);
runloop_msg_queue_push(msg, 2, 180, true);
RARCH_LOG("%s\n", msg);
should_set = true;
}
else if (should_slot_decrease && !old_should_slot_decrease)
{
char msg[128];
int new_state_slot = settings->ints.state_slot - 1;
msg[0] = '\0';
if (settings->ints.state_slot > 0)
{
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",
msg_hash_to_str(MSG_STATE_SLOT),
settings->ints.state_slot);