diff --git a/command.c b/command.c index 8686411b84..420056b950 100644 --- a/command.c +++ b/command.c @@ -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; diff --git a/config.def.h b/config.def.h index 78cb4e3ee7..248022e2c1 100644 --- a/config.def.h +++ b/config.def.h @@ -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; diff --git a/configuration.c b/configuration.c index 28659b4a0c..3eebe88a4a 100644 --- a/configuration.c +++ b/configuration.c @@ -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); diff --git a/configuration.h b/configuration.h index 9c0781601b..3612a07615 100644 --- a/configuration.h +++ b/configuration.h @@ -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; diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 1315f26510..fc371ca9c1 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -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, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 2ce9d30230..783ef789fe 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -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) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 5a8790bb4e..d32345c235 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -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; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index d04016fe4c..7a6c12b9fe 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -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( diff --git a/msg_hash.h b/msg_hash.h index 7d65595c13..9028b7698b 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -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),