Added a separately configured directory for Game Boy Color games
This commit is contained in:
parent
0a5f44357e
commit
9717255819
|
@ -81,8 +81,10 @@ EVT_HANDLER(wxID_OPEN, "Open ROM...")
|
|||
{
|
||||
if (gbEmulatorType == 1)
|
||||
open_dir = gopts.gba_rom_dir;
|
||||
else // if (gbEmulatorType == 5) // TODO: GBC rom dir
|
||||
else if (gbEmulatorType == 5)
|
||||
open_dir = gopts.gb_rom_dir;
|
||||
else
|
||||
open_dir = gopts.gbc_rom_dir;
|
||||
|
||||
// FIXME: ignore if non-existent or not a dir
|
||||
wxString pats = _(
|
||||
|
@ -96,6 +98,7 @@ EVT_HANDLER(wxID_OPEN, "Open ROM...")
|
|||
"*.dmg;*.gb;*.gbc;*.cgb;*.sgb"
|
||||
"*.dmg.gz;*.gb.gz;*.gbc.gz;*.cgb.gz;*.sgb.gz"
|
||||
"*.dmg.z;*.gb.z;*.gbc.z;*.cgb.z;*.sgb.z"
|
||||
"|"
|
||||
);
|
||||
pats.append(wxALL_FILES);
|
||||
wxFileDialog dlg(this, _("Open ROM file"), open_dir, wxT(""),
|
||||
|
|
|
@ -3063,6 +3063,7 @@ bool MainFrame::BindControls()
|
|||
{
|
||||
getdp("GBARoms", gopts.gba_rom_dir);
|
||||
getdp("GBRoms", gopts.gb_rom_dir);
|
||||
getdp("GBCRoms", gopts.gbc_rom_dir);
|
||||
getdp("BatSaves", gopts.battery_dir);
|
||||
getdp("StateSaves", gopts.state_dir);
|
||||
getdp("Screenshots", gopts.scrshot_dir);
|
||||
|
|
|
@ -156,6 +156,7 @@ opt_desc opts[] = {
|
|||
BOOLOPT("GB/PrintAutoPage", "PrintGather", wxTRANSLATE("Automatically gather a full page before printing"), gopts.print_auto_page),
|
||||
BOOLOPT("GB/PrintScreenCap", "PrintSnap", wxTRANSLATE("Automatically save printouts as screen captures with -print suffix"), gopts.print_screen_cap),
|
||||
STROPT ("GB/ROMDir", "", wxTRANSLATE("Directory to look for ROM files"), gopts.gb_rom_dir),
|
||||
STROPT ("GB/GBCROMDir", "", wxTRANSLATE("Directory to look for GBC ROM files"), gopts.gbc_rom_dir),
|
||||
|
||||
/// GBA
|
||||
STROPT ("GBA/BiosFile", "", wxTRANSLATE("BIOS file to use, if enabled"), gopts.gba_bios),
|
||||
|
|
|
@ -29,6 +29,7 @@ extern struct opts_t {
|
|||
// u16 systemGbPalette[8*3];
|
||||
bool print_auto_page, print_screen_cap;
|
||||
wxString gb_rom_dir;
|
||||
wxString gbc_rom_dir;
|
||||
|
||||
/// GBA
|
||||
wxString gba_bios;
|
||||
|
|
|
@ -46,6 +46,10 @@ void GameArea::LoadGame(const wxString &name)
|
|||
fnfn.SetPath(gopts.gb_rom_dir + wxT('/') + rp);
|
||||
badfile = !fnfn.IsFileReadable();
|
||||
}
|
||||
if (badfile && !gopts.gbc_rom_dir.empty()) {
|
||||
fnfn.SetPath(gopts.gbc_rom_dir + wxT('/') + rp);
|
||||
badfile = !fnfn.IsFileReadable();
|
||||
}
|
||||
}
|
||||
// auto-conversion of wxCharBuffer to const char * seems broken
|
||||
// so save underlying wxCharBuffer (or create one of none is used)
|
||||
|
|
|
@ -3236,6 +3236,21 @@
|
|||
<flag>wxALL|wxEXPAND</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxStaticText">
|
||||
<label>Game Boy Color ROMs</label>
|
||||
</object>
|
||||
<flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxDirPickerCtrl" name="GBCRoms">
|
||||
<message>Game Boy Color ROMs</message>
|
||||
<style>wxDIRP_USE_TEXTCTRL|wxDIRP_DIR_MUST_EXIST</style>
|
||||
</object>
|
||||
<flag>wxALL|wxEXPAND</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxStaticText">
|
||||
<label>Native Saves</label>
|
||||
|
|
|
@ -35,6 +35,21 @@
|
|||
<flag>wxALL|wxEXPAND</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxStaticText">
|
||||
<label>Game Boy Color ROMs</label>
|
||||
</object>
|
||||
<flag>wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxDirPickerCtrl" name="GBCRoms">
|
||||
<message>Game Boy Color ROMs</message>
|
||||
<style>wxDIRP_USE_TEXTCTRL|wxDIRP_DIR_MUST_EXIST</style>
|
||||
</object>
|
||||
<flag>wxALL|wxEXPAND</flag>
|
||||
<border>5</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxStaticText">
|
||||
<label>Native Saves</label>
|
||||
|
|
Loading…
Reference in New Issue