summaryrefslogtreecommitdiff
path: root/libretro.c
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-05-05 18:07:55 +0200
committerDavid G. F2021-05-05 21:15:27 +0200
commit883f07f487ecd2e803cf2f924ab1e9a51e5f4fa9 (patch)
treea6ba3622f8d9ad72e8b6d9d084ac3e04b814a5b5 /libretro.c
parent4fd456e1583a4c8686c8de87c2aeb1eb78125be1 (diff)
downloadpicogpsp-883f07f487ecd2e803cf2f924ab1e9a51e5f4fa9.tar.gz
picogpsp-883f07f487ecd2e803cf2f924ab1e9a51e5f4fa9.tar.bz2
picogpsp-883f07f487ecd2e803cf2f924ab1e9a51e5f4fa9.zip
Fix small buf and add cheat error messages
Some minor formating too
Diffstat (limited to 'libretro.c')
-rw-r--r--libretro.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libretro.c b/libretro.c
index 40aec37..d8e9efc 100644
--- a/libretro.c
+++ b/libretro.c
@@ -647,7 +647,23 @@ void retro_cheat_set(unsigned index, bool enabled, const char* code)
if (!enabled)
return;
- cheat_parse(index, code);
+ switch (cheat_parse(index, code))
+ {
+ case CheatErrorTooMany:
+ show_warning_message("Too many active cheats!", 2500);
+ break;
+ case CheatErrorTooBig:
+ show_warning_message("Cheats are too big!", 2500);
+ break;
+ case CheatErrorEncrypted:
+ show_warning_message("Encrypted cheats are not supported!", 2500);
+ break;
+ case CheatErrorNotSupported:
+ show_warning_message("Cheat type is not supported!", 2500);
+ break;
+ case CheatNoError:
+ break;
+ };
}
static void extract_directory(char* buf, const char* path, size_t size)