Start bookkeeping when we are modifying settings
This commit is contained in:
parent
e192d4eaa6
commit
1febb963ae
|
@ -42,6 +42,8 @@ RETRO_BEGIN_DECLS
|
|||
|
||||
typedef struct settings
|
||||
{
|
||||
bool modified;
|
||||
|
||||
video_viewport_t video_viewport_custom;
|
||||
|
||||
char playlist_names[PATH_MAX_LENGTH];
|
||||
|
@ -495,6 +497,10 @@ typedef struct settings
|
|||
|
||||
} settings_t;
|
||||
|
||||
#define configuration_set_int(settings, var, newvar) \
|
||||
settings->modified = true; \
|
||||
var = newvar
|
||||
|
||||
/**
|
||||
* config_get_default_camera:
|
||||
*
|
||||
|
|
|
@ -940,10 +940,11 @@ static enum runloop_state runloop_check_state(
|
|||
if (runloop_cmd_triggered(trigger_input, RARCH_STATE_SLOT_PLUS))
|
||||
{
|
||||
char msg[128];
|
||||
int new_state_slot = settings->state_slot + 1;
|
||||
|
||||
msg[0] = '\0';
|
||||
|
||||
settings->state_slot++;
|
||||
configuration_set_int(settings, settings->state_slot, new_state_slot);
|
||||
|
||||
snprintf(msg, sizeof(msg), "%s: %d",
|
||||
msg_hash_to_str(MSG_STATE_SLOT),
|
||||
|
@ -956,11 +957,14 @@ static enum runloop_state runloop_check_state(
|
|||
else if (runloop_cmd_triggered(trigger_input, RARCH_STATE_SLOT_MINUS))
|
||||
{
|
||||
char msg[128];
|
||||
int new_state_slot = settings->state_slot - 1;
|
||||
|
||||
msg[0] = '\0';
|
||||
|
||||
if (settings->state_slot > 0)
|
||||
settings->state_slot--;
|
||||
{
|
||||
configuration_set_int(settings, settings->state_slot, new_state_slot);
|
||||
}
|
||||
|
||||
snprintf(msg, sizeof(msg), "%s: %d",
|
||||
msg_hash_to_str(MSG_STATE_SLOT),
|
||||
|
|
Loading…
Reference in New Issue