mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +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_command(EVENT_CMD_CHEATS_DEINIT);
|
||||||
event_init_cheats();
|
event_init_cheats();
|
||||||
break;
|
break;
|
||||||
|
case EVENT_CMD_CHEATS_APPLY:
|
||||||
|
if (!global->cheat)
|
||||||
|
break;
|
||||||
|
|
||||||
|
cheat_manager_apply_cheats(global->cheat);
|
||||||
|
break;
|
||||||
case EVENT_CMD_REMAPPING_DEINIT:
|
case EVENT_CMD_REMAPPING_DEINIT:
|
||||||
break;
|
break;
|
||||||
case EVENT_CMD_REMAPPING_INIT:
|
case EVENT_CMD_REMAPPING_INIT:
|
||||||
|
@ -149,6 +149,8 @@ enum event_command
|
|||||||
EVENT_CMD_CHEATS_INIT,
|
EVENT_CMD_CHEATS_INIT,
|
||||||
/* Deinitializes cheats. */
|
/* Deinitializes cheats. */
|
||||||
EVENT_CMD_CHEATS_DEINIT,
|
EVENT_CMD_CHEATS_DEINIT,
|
||||||
|
/* Apply cheats. */
|
||||||
|
EVENT_CMD_CHEATS_APPLY,
|
||||||
/* Deinitializes network system. */
|
/* Deinitializes network system. */
|
||||||
EVENT_CMD_NETWORK_DEINIT,
|
EVENT_CMD_NETWORK_DEINIT,
|
||||||
/* Initializes network system. */
|
/* Initializes network system. */
|
||||||
|
@ -276,18 +276,10 @@ static int action_ok_playlist_entry(const char *path,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static int action_ok_cheat_apply_changes(const char *path,
|
static int action_ok_cheat_apply_changes(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
global_t *global = global_get_ptr();
|
event_command(EVENT_CMD_CHEATS_APPLY);
|
||||||
cheat_manager_t *cheat = global->cheat;
|
|
||||||
|
|
||||||
if (!cheat)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
cheat_manager_apply_cheats(cheat);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user