Allow use of "games" folder for core rom folders.

This commit is contained in:
Jamie Dickson
2019-10-20 14:12:47 -05:00
committed by sorgelig
parent d7b7340480
commit 45b35c2cff
10 changed files with 87 additions and 25 deletions

View File

@@ -51,7 +51,7 @@ static char cheat_zip[1024] = {};
int find_by_crc(uint32_t romcrc)
{
sprintf(cheat_zip, "%s/cheats/%s", getRootDir(), HomeDir);
sprintf(cheat_zip, "%s/cheats/%s", getRootDir(), CoreName);
DIR *d = opendir(cheat_zip);
if (!d)
{
@@ -108,7 +108,7 @@ void cheats_init(const char *rom_path, uint32_t romcrc)
const char *rom_name = strrchr(rom_path, '/');
if (rom_name)
{
sprintf(cheat_zip, "%s/cheats/%s%s", getRootDir(), HomeDir, rom_name);
sprintf(cheat_zip, "%s/cheats/%s%s", getRootDir(), CoreName, rom_name);
char *p = strrchr(cheat_zip, '.');
if (p) *p = 0;
strcat(cheat_zip, ".zip");