diff --git a/src/wx/cmdevents.cpp b/src/wx/cmdevents.cpp
index 3ea73794..65254776 100644
--- a/src/wx/cmdevents.cpp
+++ b/src/wx/cmdevents.cpp
@@ -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(""),
diff --git a/src/wx/guiinit.cpp b/src/wx/guiinit.cpp
index e6f1d8b0..5aa3d326 100644
--- a/src/wx/guiinit.cpp
+++ b/src/wx/guiinit.cpp
@@ -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);
diff --git a/src/wx/opts.cpp b/src/wx/opts.cpp
index 2458de27..15b52360 100644
--- a/src/wx/opts.cpp
+++ b/src/wx/opts.cpp
@@ -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),
diff --git a/src/wx/opts.h b/src/wx/opts.h
index ebdb179a..7c7507e5 100644
--- a/src/wx/opts.h
+++ b/src/wx/opts.h
@@ -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;
diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp
index 7242e743..e12acc7d 100644
--- a/src/wx/panel.cpp
+++ b/src/wx/panel.cpp
@@ -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)
diff --git a/src/wx/wxvbam.xrc b/src/wx/wxvbam.xrc
index 6b9e9569..ba1f79c1 100644
--- a/src/wx/wxvbam.xrc
+++ b/src/wx/wxvbam.xrc
@@ -3236,6 +3236,21 @@
wxALL|wxEXPAND
5
+
+
+
+ Game Boy Color ROMs
+
+
+ wxALL|wxEXPAND
+ 5
+
diff --git a/src/wx/xrc/DirectoriesConfig.xrc b/src/wx/xrc/DirectoriesConfig.xrc
index 7915b635..8c728fdb 100644
--- a/src/wx/xrc/DirectoriesConfig.xrc
+++ b/src/wx/xrc/DirectoriesConfig.xrc
@@ -35,6 +35,21 @@
wxALL|wxEXPAND
5
+
+
+
+
+ wxALL|wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL
+ 5
+
+
+
+ Game Boy Color ROMs
+
+
+ wxALL|wxEXPAND
+ 5
+