diff options
| author | Leo Lam <leolino.lam@gmail.com> | 2017-05-26 10:23:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-26 10:23:03 +0200 |
| commit | f4190ab1c4e6092a679664358ff6497fcc2905e6 (patch) | |
| tree | 5d8caf4ee9680d5a03e41d655e6ee9f4c43db9cf /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | 933767f1bdbf47e3c4debc009e611152bdb06352 (diff) | |
| parent | 2d75a994264de2ac2659c112ff7bf56518388e9b (diff) | |
Merge pull request #5465 from sepalani/gc-bios
Tools: Load GameCube BIOS added
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index c7682c9fac..27c3f80ca8 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -23,6 +23,7 @@ #include <wx/toplevel.h> #include "Common/CDUtils.h" +#include "Common/CommonPaths.h" #include "Common/CommonTypes.h" #include "Common/FileSearch.h" #include "Common/FileUtil.h" @@ -168,6 +169,9 @@ void CFrame::BindMenuBarEvents() Bind(wxEVT_MENU, &CFrame::OnMemcard, this, IDM_MEMCARD); Bind(wxEVT_MENU, &CFrame::OnImportSave, this, IDM_IMPORT_SAVE); Bind(wxEVT_MENU, &CFrame::OnExportAllSaves, this, IDM_EXPORT_ALL_SAVE); + Bind(wxEVT_MENU, &CFrame::OnLoadGameCubeBIOSJAP, this, IDM_LOAD_GC_BIOS_JAP); + Bind(wxEVT_MENU, &CFrame::OnLoadGameCubeBIOSUSA, this, IDM_LOAD_GC_BIOS_USA); + Bind(wxEVT_MENU, &CFrame::OnLoadGameCubeBIOSEUR, this, IDM_LOAD_GC_BIOS_EUR); Bind(wxEVT_MENU, &CFrame::OnShowCheatsWindow, this, IDM_CHEATS); Bind(wxEVT_MENU, &CFrame::OnNetPlay, this, IDM_NETPLAY); Bind(wxEVT_MENU, &CFrame::OnInstallWAD, this, IDM_MENU_INSTALL_WAD); @@ -632,7 +636,7 @@ void CFrame::ToggleDisplayMode(bool bFullscreen) } // Prepare the GUI to start the game. -void CFrame::StartGame(const std::string& filename) +void CFrame::StartGame(const std::string& filename, SConfig::EBootBS2 type) { if (m_is_game_loading) return; @@ -710,7 +714,7 @@ void CFrame::StartGame(const std::string& filename) SetDebuggerStartupParameters(); - if (!BootManager::BootCore(filename)) + if (!BootManager::BootCore(filename, type)) { DoFullscreen(false); @@ -1172,6 +1176,21 @@ void CFrame::OnMemcard(wxCommandEvent& WXUNUSED(event)) HotkeyManagerEmu::Enable(true); } +void CFrame::OnLoadGameCubeBIOSJAP(wxCommandEvent&) +{ + StartGame("", SConfig::BOOT_BS2_JAP); +} + +void CFrame::OnLoadGameCubeBIOSUSA(wxCommandEvent&) +{ + StartGame("", SConfig::BOOT_BS2_USA); +} + +void CFrame::OnLoadGameCubeBIOSEUR(wxCommandEvent&) +{ + StartGame("", SConfig::BOOT_BS2_EUR); +} + void CFrame::OnExportAllSaves(wxCommandEvent& WXUNUSED(event)) { CWiiSaveCrypted::ExportAllSaves(); @@ -1478,6 +1497,15 @@ void CFrame::UpdateGUI() GetMenuBar()->FindItem(IDM_SAVE_STATE)->Enable(Initialized); // Misc GetMenuBar()->FindItem(IDM_CHANGE_DISC)->Enable(Initialized); + GetMenuBar() + ->FindItem(IDM_LOAD_GC_BIOS_JAP) + ->Enable(!Initialized && File::Exists(SConfig::GetInstance().GetBootROMPath(JAP_DIR))); + GetMenuBar() + ->FindItem(IDM_LOAD_GC_BIOS_USA) + ->Enable(!Initialized && File::Exists(SConfig::GetInstance().GetBootROMPath(USA_DIR))); + GetMenuBar() + ->FindItem(IDM_LOAD_GC_BIOS_EUR) + ->Enable(!Initialized && File::Exists(SConfig::GetInstance().GetBootROMPath(EUR_DIR))); if (DiscIO::CNANDContentManager::Access() .GetNANDLoader(TITLEID_SYSMENU, Common::FROM_CONFIGURED_ROOT) .IsValid()) |
