summaryrefslogtreecommitdiff
path: root/libretro.c
diff options
context:
space:
mode:
Diffstat (limited to 'libretro.c')
-rw-r--r--libretro.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libretro.c b/libretro.c
index 21ca04f..40aec37 100644
--- a/libretro.c
+++ b/libretro.c
@@ -639,8 +639,16 @@ bool retro_unserialize(const void* data, size_t size)
void retro_cheat_reset(void)
{
+ cheat_clear();
+}
+
+void retro_cheat_set(unsigned index, bool enabled, const char* code)
+{
+ if (!enabled)
+ return;
+
+ cheat_parse(index, code);
}
-void retro_cheat_set(unsigned index, bool enabled, const char* code) {}
static void extract_directory(char* buf, const char* path, size_t size)
{