diff options
| author | Leo Lam <leolino.lam@gmail.com> | 2017-06-06 16:51:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-06 16:51:43 +0200 |
| commit | 591aade9361be61ff51764ad0ad23999706eb0c6 (patch) | |
| tree | 3460c922ef3d82eedd4ae39f94abd0af702417b3 /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | 096399d3719769dde4004bcefec87a447fd32cf3 (diff) | |
| parent | d50b4406a66f1d9e09ad095df38fae9d57a3a729 (diff) | |
Merge pull request #5492 from leoetlino/boot-cleanup
Clean up the boot code
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 22f0096cb6..8ac6fd7e08 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -30,6 +30,7 @@ #include "Common/NandPaths.h" #include "Common/StringUtil.h" +#include "Core/Boot/Boot.h" #include "Core/BootManager.h" #include "Core/ConfigManager.h" #include "Core/Core.h" @@ -53,6 +54,7 @@ #include "Core/PowerPC/PowerPC.h" #include "Core/State.h" +#include "DiscIO/Enums.h" #include "DiscIO/NANDContentLoader.h" #include "DiscIO/NANDImporter.h" #include "DiscIO/VolumeWad.h" @@ -315,7 +317,7 @@ void CFrame::BootGame(const std::string& filename) } if (!bootfile.empty()) { - StartGame(bootfile); + StartGame(BootParameters::GenerateFromFile(bootfile)); } } @@ -627,7 +629,7 @@ void CFrame::ToggleDisplayMode(bool bFullscreen) } // Prepare the GUI to start the game. -void CFrame::StartGame(const std::string& filename, SConfig::EBootBS2 type) +void CFrame::StartGame(std::unique_ptr<BootParameters> boot) { if (m_is_game_loading) return; @@ -705,7 +707,7 @@ void CFrame::StartGame(const std::string& filename, SConfig::EBootBS2 type) SetDebuggerStartupParameters(); - if (!BootManager::BootCore(filename, type)) + if (!BootManager::BootCore(std::move(boot))) { DoFullscreen(false); @@ -1169,17 +1171,17 @@ void CFrame::OnMemcard(wxCommandEvent& WXUNUSED(event)) void CFrame::OnLoadGameCubeIPLJAP(wxCommandEvent&) { - StartGame("", SConfig::BOOT_BS2_JAP); + StartGame(std::make_unique<BootParameters>(BootParameters::IPL{DiscIO::Region::NTSC_J})); } void CFrame::OnLoadGameCubeIPLUSA(wxCommandEvent&) { - StartGame("", SConfig::BOOT_BS2_USA); + StartGame(std::make_unique<BootParameters>(BootParameters::IPL{DiscIO::Region::NTSC_U})); } void CFrame::OnLoadGameCubeIPLEUR(wxCommandEvent&) { - StartGame("", SConfig::BOOT_BS2_EUR); + StartGame(std::make_unique<BootParameters>(BootParameters::IPL{DiscIO::Region::PAL})); } void CFrame::OnExportAllSaves(wxCommandEvent& WXUNUSED(event)) |
