diff options
author | David Guillen Fandos | 2021-05-05 02:20:00 +0200 |
---|---|---|
committer | David G. F | 2021-05-05 21:15:27 +0200 |
commit | 4fd456e1583a4c8686c8de87c2aeb1eb78125be1 (patch) | |
tree | a808a15f40df0f09226fc8e4a620b0f546b48729 /libretro.c | |
parent | 52088a4d10af9a8c0e95b0eb168d4dfd0a13639f (diff) | |
download | picogpsp-4fd456e1583a4c8686c8de87c2aeb1eb78125be1.tar.gz picogpsp-4fd456e1583a4c8686c8de87c2aeb1eb78125be1.tar.bz2 picogpsp-4fd456e1583a4c8686c8de87c2aeb1eb78125be1.zip |
Adding Code Breaker cheat support
This works on both interpreter and dynarec.
Tested in MIPS, ARM and x86, still needs some more testing, some edge
cases can be buggy.
Diffstat (limited to 'libretro.c')
-rw-r--r-- | libretro.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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) { |