From 67e9725198c2f83353547a5acebed4c3bac635ff Mon Sep 17 00:00:00 2001 From: sorgelig Date: Sun, 26 Apr 2020 18:34:56 +0800 Subject: [PATCH] Do not use CRC for PCE CD cheats. --- cheats.cpp | 2 ++ menu.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cheats.cpp b/cheats.cpp index 5ca8350..14fca17 100644 --- a/cheats.cpp +++ b/cheats.cpp @@ -51,6 +51,8 @@ static char cheat_zip[1024] = {}; int find_by_crc(uint32_t romcrc) { + if (!romcrc) return 0; + sprintf(cheat_zip, "%s/cheats/%s", getRootDir(), CoreName); DIR *d = opendir(cheat_zip); if (!d) diff --git a/menu.cpp b/menu.cpp index bf0b7e5..270198f 100644 --- a/menu.cpp +++ b/menu.cpp @@ -1744,7 +1744,7 @@ void HandleUI(void) } user_io_store_filename(SelectedPath); user_io_file_tx(SelectedPath, user_io_ext_idx(SelectedPath, fs_pFileExt) << 6 | ioctl_index, opensave); - if (user_io_use_cheats()) cheats_init(SelectedPath, user_io_get_file_crc()); + if (user_io_use_cheats()) cheats_init(SelectedPath, pcecd_using_cd() ? 0 : user_io_get_file_crc()); menustate = MENU_NONE1; }