mirror of https://github.com/snes9xgit/snes9x.git
Rename IPS_DIR to PATCH_DIR, split cheats path in win32
This commit is contained in:
parent
7455501db8
commit
cb3ace471e
|
@ -204,7 +204,7 @@ enum s9x_getdirtype
|
|||
SCREENSHOT_DIR,
|
||||
SPC_DIR,
|
||||
CHEAT_DIR,
|
||||
IPS_DIR,
|
||||
PATCH_DIR,
|
||||
BIOS_DIR,
|
||||
LOG_DIR,
|
||||
SAT_DIR,
|
||||
|
|
|
@ -142,7 +142,7 @@ S9xGetDirectory (enum s9x_getdirtype dirtype)
|
|||
sprintf (path, "%s", gui_config->savestate_directory);
|
||||
break;
|
||||
|
||||
case IPS_DIR:
|
||||
case PATCH_DIR:
|
||||
sprintf (path, "%s", gui_config->patch_directory);
|
||||
break;
|
||||
|
||||
|
|
12
memmap.cpp
12
memmap.cpp
|
@ -4280,7 +4280,7 @@ void CMemory::CheckForAnyPatch (const char *rom_filename, bool8 header, int32 &r
|
|||
}
|
||||
#endif
|
||||
|
||||
n = S9xGetFilename(".bps", IPS_DIR);
|
||||
n = S9xGetFilename(".bps", PATCH_DIR);
|
||||
|
||||
if ((patch_file = OPEN_FSTREAM(n, "rb")) != NULL)
|
||||
{
|
||||
|
@ -4344,7 +4344,7 @@ void CMemory::CheckForAnyPatch (const char *rom_filename, bool8 header, int32 &r
|
|||
}
|
||||
#endif
|
||||
|
||||
n = S9xGetFilename(".ups", IPS_DIR);
|
||||
n = S9xGetFilename(".ups", PATCH_DIR);
|
||||
|
||||
if ((patch_file = OPEN_FSTREAM(n, "rb")) != NULL)
|
||||
{
|
||||
|
@ -4626,7 +4626,7 @@ void CMemory::CheckForAnyPatch (const char *rom_filename, bool8 header, int32 &r
|
|||
}
|
||||
#endif
|
||||
|
||||
n = S9xGetFilename(".ips", IPS_DIR);
|
||||
n = S9xGetFilename(".ips", PATCH_DIR);
|
||||
|
||||
if ((patch_file = OPEN_FSTREAM(n, "rb")) != NULL)
|
||||
{
|
||||
|
@ -4653,7 +4653,7 @@ void CMemory::CheckForAnyPatch (const char *rom_filename, bool8 header, int32 &r
|
|||
do
|
||||
{
|
||||
snprintf(ips, 9, ".%03d.ips", i);
|
||||
n = S9xGetFilename(ips, IPS_DIR);
|
||||
n = S9xGetFilename(ips, PATCH_DIR);
|
||||
|
||||
if (!(patch_file = OPEN_FSTREAM(n, "rb")))
|
||||
break;
|
||||
|
@ -4690,7 +4690,7 @@ void CMemory::CheckForAnyPatch (const char *rom_filename, bool8 header, int32 &r
|
|||
snprintf(ips, _MAX_EXT + 3, ".ips%d", i);
|
||||
if (strlen(ips) > _MAX_EXT + 1)
|
||||
break;
|
||||
n = S9xGetFilename(ips, IPS_DIR);
|
||||
n = S9xGetFilename(ips, PATCH_DIR);
|
||||
|
||||
if (!(patch_file = OPEN_FSTREAM(n, "rb")))
|
||||
break;
|
||||
|
@ -4725,7 +4725,7 @@ void CMemory::CheckForAnyPatch (const char *rom_filename, bool8 header, int32 &r
|
|||
do
|
||||
{
|
||||
snprintf(ips, 5, ".ip%d", i);
|
||||
n = S9xGetFilename(ips, IPS_DIR);
|
||||
n = S9xGetFilename(ips, PATCH_DIR);
|
||||
|
||||
if (!(patch_file = OPEN_FSTREAM(n, "rb")))
|
||||
break;
|
||||
|
|
4
msu1.cpp
4
msu1.cpp
|
@ -261,7 +261,7 @@ STREAM S9xMSU1OpenFile(char *msu_ext, bool skip_unpacked)
|
|||
|
||||
if (!unzFile)
|
||||
{
|
||||
zip_filename = S9xGetFilename(".msu1", IPS_DIR);
|
||||
zip_filename = S9xGetFilename(".msu1", PATCH_DIR);
|
||||
unzFile = unzOpen(zip_filename);
|
||||
}
|
||||
|
||||
|
@ -395,7 +395,7 @@ bool S9xMSU1ROMExists(void)
|
|||
unzFile unzFile = unzOpen(S9xGetFilename(".msu1", ROMFILENAME_DIR));
|
||||
|
||||
if(!unzFile)
|
||||
unzFile = unzOpen(S9xGetFilename(".msu1", IPS_DIR));
|
||||
unzFile = unzOpen(S9xGetFilename(".msu1", PATCH_DIR));
|
||||
|
||||
if (unzFile)
|
||||
{
|
||||
|
|
|
@ -278,7 +278,7 @@ static const char dirNames[13][32] =
|
|||
"screenshot", // SCREENSHOT_DIR
|
||||
"spc", // SPC_DIR
|
||||
"cheat", // CHEAT_DIR
|
||||
"patch", // IPS_DIR
|
||||
"patch", // PATCH_DIR
|
||||
"bios", // BIOS_DIR
|
||||
"log", // LOG_DIR
|
||||
""
|
||||
|
|
|
@ -951,7 +951,8 @@ void WinRegisterConfigItems()
|
|||
AddStringC("Dir:SPCs", GUI.SPCDir, _MAX_PATH, ".\\SPCs", "directory where SPCs will be saved");
|
||||
AddStringC("Dir:Savestates", GUI.FreezeFileDir, _MAX_PATH, ".\\Saves", "directory where savestates will be created and loaded from");
|
||||
AddStringC("Dir:SRAM", GUI.SRAMFileDir, _MAX_PATH, ".\\Saves", "directory where battery saves will be created and loaded from");
|
||||
AddStringC("Dir:Patches", GUI.PatchDir, _MAX_PATH, ".\\Cheats", "directory in which ROM patches (.ips files) and cheats (.cht files) will be looked for");
|
||||
AddStringC("Dir:Cheats", GUI.CheatDir, _MAX_PATH, ".\\Cheats", "directory in which cheats (.cht files) will be looked for");
|
||||
AddStringC("Dir:Patches", GUI.PatchDir, _MAX_PATH, ".\\Patches", "directory in which ROM patches (.ips/.bps/.ups files) will be looked for");
|
||||
AddStringC("Dir:Bios", GUI.BiosDir, _MAX_PATH, ".\\BIOS", "directory where BIOS files (such as \"BS-X.bios\") will be located");
|
||||
AddStringC("Dir:SatData", GUI.SatDir, _MAX_PATH, ".\\SatData", "directory where Satellaview Signal Data files will be located");
|
||||
AddBoolC("Dir:Lock", GUI.LockDirectories, false, "true to prevent Snes9x from changing configured directories when you browse to a new location");
|
||||
|
|
|
@ -344,11 +344,14 @@ const TCHAR *S9xGetDirectoryT (enum s9x_getdirtype dirtype)
|
|||
rv = GUI.SPCDir;
|
||||
break;
|
||||
|
||||
case IPS_DIR:
|
||||
case CHEAT_DIR:
|
||||
case PATCH_DIR:
|
||||
rv = GUI.PatchDir;
|
||||
break;
|
||||
|
||||
case CHEAT_DIR:
|
||||
rv = GUI.CheatDir;
|
||||
break;
|
||||
|
||||
case SNAPSHOT_DIR:
|
||||
rv = GUI.FreezeFileDir;
|
||||
break;
|
||||
|
|
|
@ -578,7 +578,8 @@ Nintendo is a trade mark.")
|
|||
#define SETTINGS_OPTION_DIRECTORY_SPCS TEXT("SPCs")
|
||||
#define SETTINGS_OPTION_DIRECTORY_SAVES TEXT("Saves")
|
||||
#define SETTINGS_OPTION_DIRECTORY_SRAM TEXT("SRAM")
|
||||
#define SETTINGS_OPTION_DIRECTORY_PATCHESANDCHEATS TEXT("Patch&Cheat")
|
||||
#define SETTINGS_OPTION_DIRECTORY_PATCHES TEXT("Patch")
|
||||
#define SETTINGS_OPTION_DIRECTORY_CHEATS TEXT("Cheat")
|
||||
#define SETTINGS_OPTION_DIRECTORY_BIOS TEXT("BIOS files")
|
||||
#define SETTINGS_OPTION_DIRECTORY_SATDATA TEXT("Satellaview")
|
||||
|
||||
|
|
|
@ -5134,7 +5134,7 @@ INT_PTR CALLBACK DlgAboutProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
INT_PTR CALLBACK DlgEmulatorProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static TCHAR paths[9][MAX_PATH];
|
||||
static TCHAR paths[10][MAX_PATH];
|
||||
static int which = 0;
|
||||
switch(msg)
|
||||
{
|
||||
|
@ -5182,7 +5182,9 @@ INT_PTR CALLBACK DlgEmulatorProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
|
|||
lstrcpy(paths[inum++],GUI.SRAMFileDir);
|
||||
SendDlgItemMessage(hDlg,IDC_DIRCOMBO,CB_ADDSTRING,0,(LPARAM)(LPCTSTR)SETTINGS_OPTION_DIRECTORY_SRAM);
|
||||
lstrcpy(paths[inum++],GUI.PatchDir);
|
||||
SendDlgItemMessage(hDlg,IDC_DIRCOMBO,CB_ADDSTRING,0,(LPARAM)(LPCTSTR)SETTINGS_OPTION_DIRECTORY_PATCHESANDCHEATS);
|
||||
SendDlgItemMessage(hDlg,IDC_DIRCOMBO,CB_ADDSTRING,0,(LPARAM)(LPCTSTR)SETTINGS_OPTION_DIRECTORY_PATCHES);
|
||||
lstrcpy(paths[inum++], GUI.CheatDir);
|
||||
SendDlgItemMessage(hDlg, IDC_DIRCOMBO, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)SETTINGS_OPTION_DIRECTORY_CHEATS);
|
||||
lstrcpy(paths[inum++],GUI.BiosDir);
|
||||
SendDlgItemMessage(hDlg,IDC_DIRCOMBO,CB_ADDSTRING,0,(LPARAM)(LPCTSTR)SETTINGS_OPTION_DIRECTORY_BIOS);
|
||||
lstrcpy(paths[inum++],GUI.SatDir);
|
||||
|
@ -5248,6 +5250,7 @@ INT_PTR CALLBACK DlgEmulatorProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
|
|||
lstrcpy(GUI.FreezeFileDir,paths[inum++]);
|
||||
lstrcpy(GUI.SRAMFileDir,paths[inum++]);
|
||||
lstrcpy(GUI.PatchDir,paths[inum++]);
|
||||
lstrcpy(GUI.CheatDir, paths[inum++]);
|
||||
lstrcpy(GUI.BiosDir,paths[inum++]);
|
||||
lstrcpy(GUI.SatDir,paths[inum++]);
|
||||
|
||||
|
|
|
@ -393,6 +393,7 @@ struct sGUI {
|
|||
TCHAR FreezeFileDir [_MAX_PATH];
|
||||
TCHAR SRAMFileDir [_MAX_PATH];
|
||||
TCHAR PatchDir [_MAX_PATH];
|
||||
TCHAR CheatDir [_MAX_PATH];
|
||||
TCHAR BiosDir [_MAX_PATH];
|
||||
TCHAR SatDir [_MAX_PATH];
|
||||
bool LockDirectories;
|
||||
|
|
Loading…
Reference in New Issue