Skip to content

Commit

Permalink
Add CORE_CTL_RETRO_CHEAT_RESET
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Jan 28, 2016
1 parent 857618d commit 0d81f66
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cheats.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "general.h"
#include "runloop.h"
#include "dynamic.h"
#include "libretro_version_1.h"
#include "verbosity.h"

#ifdef HAVE_CONFIG_H
Expand Down Expand Up @@ -78,7 +79,7 @@ void cheat_manager_apply_cheats(void)
if (!handle)
return;

core.retro_cheat_reset();
core_ctl(CORE_CTL_RETRO_CHEAT_RESET, NULL);

for (i = 0; i < handle->size; i++)
{
Expand Down
3 changes: 3 additions & 0 deletions libretro_version_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ bool core_ctl(enum core_ctl_state state, void *data)

switch (state)
{
case CORE_CTL_RETRO_CHEAT_RESET:
core.retro_cheat_reset();
break;
case CORE_CTL_RETRO_API_VERSION:
{
retro_ctx_api_info_t *api = (retro_ctx_api_info_t*)data;
Expand Down
2 changes: 2 additions & 0 deletions libretro_version_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ enum core_ctl_state

CORE_CTL_RETRO_SYMBOLS_INIT,

CORE_CTL_RETRO_CHEAT_RESET,

CORE_CTL_RETRO_API_VERSION,

/* Compare libretro core API version against API version
Expand Down

0 comments on commit 0d81f66

Please sign in to comment.