Add setting for the savestate thumbnails
This commit is contained in:
parent
a0c5a28602
commit
d00566b018
|
@ -1683,7 +1683,8 @@ static void command_event_main_state(unsigned cmd)
|
|||
switch (cmd)
|
||||
{
|
||||
case CMD_EVENT_SAVE_STATE:
|
||||
take_savestate_screenshot(path);
|
||||
if (settings->savestate_thumbnail_enable)
|
||||
take_savestate_screenshot(path);
|
||||
content_save_state(path, true, false);
|
||||
push_msg = false;
|
||||
break;
|
||||
|
|
|
@ -781,6 +781,8 @@ static const bool savestate_auto_index = false;
|
|||
static const bool savestate_auto_save = false;
|
||||
static const bool savestate_auto_load = false;
|
||||
|
||||
static const bool savestate_thumbnail_enable = false;
|
||||
|
||||
/* Slowmotion ratio. */
|
||||
static const float slowmotion_ratio = 3.0;
|
||||
|
||||
|
|
|
@ -806,6 +806,7 @@ static int populate_settings_bool(settings_t *settings, struct config_bool_setti
|
|||
SETTING_BOOL("savestate_auto_index", &settings->savestate_auto_index, true, savestate_auto_index, false);
|
||||
SETTING_BOOL("savestate_auto_save", &settings->savestate_auto_save, true, savestate_auto_save, false);
|
||||
SETTING_BOOL("savestate_auto_load", &settings->savestate_auto_load, true, savestate_auto_load, false);
|
||||
SETTING_BOOL("savestate_thumbnail_enable", &settings->savestate_thumbnail_enable, true, savestate_thumbnail_enable, false);
|
||||
SETTING_BOOL("history_list_enable", &settings->history_list_enable, true, def_history_list_enable, false);
|
||||
SETTING_BOOL("game_specific_options", &settings->game_specific_options, true, default_game_specific_options, false);
|
||||
SETTING_BOOL("auto_overrides_enable", &settings->auto_overrides_enable, true, default_auto_overrides_enable, false);
|
||||
|
|
|
@ -428,6 +428,7 @@ typedef struct settings
|
|||
bool savestate_auto_index;
|
||||
bool savestate_auto_save;
|
||||
bool savestate_auto_load;
|
||||
bool savestate_thumbnail_enable;
|
||||
|
||||
bool network_cmd_enable;
|
||||
unsigned network_cmd_port;
|
||||
|
|
|
@ -1162,6 +1162,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE,
|
|||
"Auto Save State")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY,
|
||||
"Savestate")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE,
|
||||
"Savestate Thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG,
|
||||
"Save Current Configuration")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
|
|
|
@ -879,7 +879,8 @@ static void xmb_update_thumbnail_path(void *data, unsigned i)
|
|||
}
|
||||
}
|
||||
|
||||
if (string_is_equal(entry.label, "state_slot"))
|
||||
if (settings->savestate_thumbnail_enable
|
||||
&& string_is_equal(entry.label, "state_slot"))
|
||||
{
|
||||
char path[PATH_MAX_LENGTH] = {0};
|
||||
if (settings->state_slot > 0)
|
||||
|
|
|
@ -4610,6 +4610,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SAVESTATE_AUTO_LOAD,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SAVESTATE_THUMBNAIL_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
|
|
|
@ -2928,7 +2928,7 @@ static bool setting_append_list(
|
|||
case SETTINGS_LIST_SAVING:
|
||||
{
|
||||
unsigned i;
|
||||
struct bool_entry bool_entries[6];
|
||||
struct bool_entry bool_entries[7];
|
||||
|
||||
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS), parent_group);
|
||||
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SAVING_SETTINGS);
|
||||
|
@ -2972,6 +2972,12 @@ static bool setting_append_list(
|
|||
bool_entries[5].default_value = savestate_auto_load;
|
||||
bool_entries[5].flags = SD_FLAG_NONE;
|
||||
|
||||
bool_entries[6].target = &settings->savestate_thumbnail_enable;
|
||||
bool_entries[6].name_enum_idx = MENU_ENUM_LABEL_SAVESTATE_THUMBNAIL_ENABLE;
|
||||
bool_entries[6].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE;
|
||||
bool_entries[6].default_value = savestate_thumbnail_enable;
|
||||
bool_entries[6].flags = SD_FLAG_NONE;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(bool_entries); i++)
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
|
|
|
@ -959,6 +959,7 @@ enum msg_hash_enums
|
|||
MENU_LABEL(SAVESTATE_AUTO_INDEX),
|
||||
MENU_LABEL(SAVESTATE_AUTO_SAVE),
|
||||
MENU_LABEL(SAVESTATE_AUTO_LOAD),
|
||||
MENU_LABEL(SAVESTATE_THUMBNAIL_ENABLE),
|
||||
|
||||
MENU_LABEL(SUSPEND_SCREENSAVER_ENABLE),
|
||||
MENU_LABEL(DPI_OVERRIDE_ENABLE),
|
||||
|
|
Loading…
Reference in New Issue