Add IPS_DIR to the search path for .msu1 pack files

This commit is contained in:
qwertymodo 2017-08-17 10:34:13 -07:00
parent f8da152441
commit ab2da6d913
2 changed files with 13 additions and 0 deletions

View File

@ -4261,6 +4261,13 @@ void CMemory::CheckForAnyPatch (const char *rom_filename, bool8 header, int32 &r
_makepath(fname, drive, dir, name, "msu1"); _makepath(fname, drive, dir, name, "msu1");
unzFile msu1file = unzOpen(fname); unzFile msu1file = unzOpen(fname);
if (!msu1file)
{
_snprintf(fname, sizeof(fname), "%s" SLASH_STR "%s%s",
S9xGetDirectory(IPS_DIR), name, ".msu1");
msu1file = unzOpen(fname);
}
if (msu1file) if (msu1file)
{ {
int port = unzFindExtension(msu1file, "bps"); int port = unzFindExtension(msu1file, "bps");

View File

@ -259,6 +259,12 @@ STREAM S9xMSU1OpenFile(char *msu_ext)
unzFile = unzOpen(zip_filename); unzFile = unzOpen(zip_filename);
} }
if (!unzFile)
{
zip_filename = S9xGetFilename(".msu1", IPS_DIR);
unzFile = unzOpen(zip_filename);
}
if (unzFile) if (unzFile)
{ {
int port = unzFindExtension(unzFile, msu_ext); int port = unzFindExtension(unzFile, msu_ext);