reset hardcore default to enabled; show message when trying to load state in hardcore (#13471)

This commit is contained in:
Jamiras 2022-01-11 05:48:05 -07:00 committed by GitHub
parent 4cf1bcf70f
commit 0a1ffcd4d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 12 deletions

View File

@ -1896,7 +1896,7 @@ static struct config_bool_setting *populate_settings_bool(
#ifdef HAVE_CHEEVOS
SETTING_BOOL("cheevos_enable", &settings->bools.cheevos_enable, true, DEFAULT_CHEEVOS_ENABLE, false);
SETTING_BOOL("cheevos_test_unofficial", &settings->bools.cheevos_test_unofficial, true, false, false);
SETTING_BOOL("cheevos_hardcore_mode_enable", &settings->bools.cheevos_hardcore_mode_enable, true, false, false);
SETTING_BOOL("cheevos_hardcore_mode_enable", &settings->bools.cheevos_hardcore_mode_enable, true, true, false);
SETTING_BOOL("cheevos_challenge_indicators", &settings->bools.cheevos_challenge_indicators, true, true, false);
SETTING_BOOL("cheevos_richpresence_enable", &settings->bools.cheevos_richpresence_enable, true, true, false);
SETTING_BOOL("cheevos_unlock_sound_enable", &settings->bools.cheevos_unlock_sound_enable, true, false, false);

View File

@ -12254,6 +12254,10 @@ MSG_HASH(
MSG_FAILED_TO_RECEIVE_HEADER_FROM_HOST,
"Failed to receive header from host"
)
MSG_HASH(
MSG_CHEEVOS_LOAD_STATE_PREVENTED_BY_HARDCORE_MODE,
"You must pause or disable Achievements Hardcore Mode to load states."
)
MSG_HASH(
MSG_CHEEVOS_HARDCORE_MODE_DISABLED,
"A save state was loaded. Achievements Hardcore Mode disabled for the current session."

View File

@ -2934,17 +2934,12 @@ static int menu_displaylist_parse_load_content_settings(
MENU_SETTING_ACTION_SAVESTATE, 0, 0))
count++;
#ifdef HAVE_CHEEVOS
if (!rcheevos_hardcore_active())
#endif
{
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_STATE),
msg_hash_to_str(MENU_ENUM_LABEL_LOAD_STATE),
MENU_ENUM_LABEL_LOAD_STATE,
MENU_SETTING_ACTION_LOADSTATE, 0, 0))
count++;
}
if (menu_entries_append_enum(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_STATE),
msg_hash_to_str(MENU_ENUM_LABEL_LOAD_STATE),
MENU_ENUM_LABEL_LOAD_STATE,
MENU_SETTING_ACTION_LOADSTATE, 0, 0))
count++;
}
if (settings->bools.quick_menu_show_save_load_state &&

View File

@ -3165,6 +3165,7 @@ enum msg_hash_enums
MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS,
MSG_CHEAT_SEARCH_ADD_MATCH_FAIL,
MSG_CHEAT_SEARCH_DELETE_MATCH_SUCCESS,
MSG_CHEEVOS_LOAD_STATE_PREVENTED_BY_HARDCORE_MODE,
MSG_CHEEVOS_HARDCORE_MODE_DISABLED,
MSG_CHEEVOS_HARDCORE_MODE_DISABLED_CHEAT,
MENU_ENUM_LABEL_VALUE_TIMEDATE_YMD_HMS,

View File

@ -1767,7 +1767,10 @@ bool command_event(enum event_command cmd, void *data)
#ifdef HAVE_CHEEVOS
if (rcheevos_hardcore_active())
{
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEEVOS_LOAD_STATE_PREVENTED_BY_HARDCORE_MODE), 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING);
return false;
}
#endif
if (!command_event_main_state(cmd))
return false;