mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
Merge pull request #7030 from RetroSven/master
add "reload game-specific cheats" option to cheats menu
This commit is contained in:
commit
0d157bc09f
@ -1625,6 +1625,8 @@ MSG_HASH(MENU_ENUM_LABEL_CHEAT_ADD_NEW_BOTTOM,
|
||||
"cheat_add_new_bottom")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEAT_DELETE_ALL,
|
||||
"cheat_delete_all")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS,
|
||||
"cheat_reload_cheats")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEAT_BIG_ENDIAN,
|
||||
"cheat_big_endian")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEAT_MATCH_IDX,
|
||||
|
@ -2013,6 +2013,10 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
" ");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS:
|
||||
snprintf(s, len,
|
||||
" ");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_ADD_NEW_BOTTOM:
|
||||
snprintf(s, len,
|
||||
" ");
|
||||
|
@ -2918,6 +2918,10 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEAT_DELETE_ALL,
|
||||
""
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEAT_RELOAD_CHEATS,
|
||||
""
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEAT_BIG_ENDIAN,
|
||||
"Big endian : 258 = 0x0102,\nLittle endian : 258 = 0x0201"
|
||||
@ -4080,6 +4084,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM,
|
||||
"Add New Code to Bottom")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL,
|
||||
"Delete All Codes")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_RELOAD_CHEATS,
|
||||
"Reload Game-Specific Cheats")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL,
|
||||
"Equal to %u (%X)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEAT_SEARCH_LT_VAL,
|
||||
|
@ -2656,7 +2656,18 @@ static int action_ok_audio_run(const char *path,
|
||||
#endif
|
||||
}
|
||||
|
||||
static int action_ok_cheat_add_top(const char *path,
|
||||
static int action_ok_cheat_reload_cheats(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
bool refresh = false ;
|
||||
cheat_manager_realloc(0, CHEAT_HANDLER_TYPE_EMU);
|
||||
cheat_manager_load_game_specific_cheats() ;
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
static int action_ok_cheat_add_top(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
int i;
|
||||
@ -4569,6 +4580,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_CHEAT_ADD_NEW_TOP:
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_add_top);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS:
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_reload_cheats);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_ADD_NEW_BOTTOM:
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_add_bottom);
|
||||
break;
|
||||
|
@ -227,6 +227,7 @@ default_sublabel_macro(action_bind_sublabel_cheat_create_option, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_cheat_delete_option, MENU_ENUM_SUBLABEL_CHEAT_DELETE_OPTION)
|
||||
default_sublabel_macro(action_bind_sublabel_cheat_add_new_top, MENU_ENUM_SUBLABEL_CHEAT_ADD_NEW_TOP)
|
||||
default_sublabel_macro(action_bind_sublabel_cheat_add_new_bottom, MENU_ENUM_SUBLABEL_CHEAT_ADD_NEW_BOTTOM)
|
||||
default_sublabel_macro(action_bind_sublabel_cheat_reload_cheats, MENU_ENUM_SUBLABEL_CHEAT_RELOAD_CHEATS)
|
||||
default_sublabel_macro(action_bind_sublabel_cheat_address_bit_position, MENU_ENUM_SUBLABEL_CHEAT_ADDRESS_BIT_POSITION)
|
||||
default_sublabel_macro(action_bind_sublabel_cheat_delete_all, MENU_ENUM_SUBLABEL_CHEAT_DELETE_ALL)
|
||||
default_sublabel_macro(action_bind_sublabel_libretro_log_level, MENU_ENUM_SUBLABEL_LIBRETRO_LOG_LEVEL)
|
||||
@ -1451,6 +1452,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_CHEAT_ADD_NEW_TOP:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheat_add_new_top);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheat_reload_cheats);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_ADD_NEW_BOTTOM:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheat_add_new_bottom);
|
||||
break;
|
||||
|
@ -3179,6 +3179,11 @@ static int menu_displaylist_parse_options_cheats(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND),
|
||||
MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT_RELOAD_CHEATS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS),
|
||||
MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT_FILE_SAVE_AS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_SAVE_AS),
|
||||
|
@ -1242,6 +1242,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(CHEAT_ADD_NEW_TOP),
|
||||
MENU_LABEL(CHEAT_ADD_NEW_BOTTOM),
|
||||
MENU_LABEL(CHEAT_DELETE_ALL),
|
||||
MENU_LABEL(CHEAT_RELOAD_CHEATS),
|
||||
MENU_LABEL(CHEAT_BIG_ENDIAN),
|
||||
MENU_LABEL(CHEAT_MATCH_IDX),
|
||||
MENU_LABEL(CHEAT_MATCH),
|
||||
|
Loading…
x
Reference in New Issue
Block a user