mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Create EVENT_CMD_CHEATS_APPLY
This commit is contained in:
parent
1a54984fe9
commit
bbf7e02139
@ -1187,6 +1187,12 @@ bool event_command(enum event_command cmd)
|
||||
event_command(EVENT_CMD_CHEATS_DEINIT);
|
||||
event_init_cheats();
|
||||
break;
|
||||
case EVENT_CMD_CHEATS_APPLY:
|
||||
if (!global->cheat)
|
||||
break;
|
||||
|
||||
cheat_manager_apply_cheats(global->cheat);
|
||||
break;
|
||||
case EVENT_CMD_REMAPPING_DEINIT:
|
||||
break;
|
||||
case EVENT_CMD_REMAPPING_INIT:
|
||||
|
@ -149,6 +149,8 @@ enum event_command
|
||||
EVENT_CMD_CHEATS_INIT,
|
||||
/* Deinitializes cheats. */
|
||||
EVENT_CMD_CHEATS_DEINIT,
|
||||
/* Apply cheats. */
|
||||
EVENT_CMD_CHEATS_APPLY,
|
||||
/* Deinitializes network system. */
|
||||
EVENT_CMD_NETWORK_DEINIT,
|
||||
/* Initializes network system. */
|
||||
|
@ -276,18 +276,10 @@ static int action_ok_playlist_entry(const char *path,
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int action_ok_cheat_apply_changes(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
cheat_manager_t *cheat = global->cheat;
|
||||
|
||||
if (!cheat)
|
||||
return -1;
|
||||
|
||||
cheat_manager_apply_cheats(cheat);
|
||||
event_command(EVENT_CMD_CHEATS_APPLY);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user