From f9ffbd8c326307ba3bc465da50ee6742264c326a Mon Sep 17 00:00:00 2001 From: John Peterson Date: Sun, 18 Jan 2009 09:49:28 +0000 Subject: [PATCH] BootManager: Cosmetic changes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1917 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/BootManager.cpp | 29 ++++++++++++++++------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/Source/Core/DolphinWX/Src/BootManager.cpp b/Source/Core/DolphinWX/Src/BootManager.cpp index 7d73e6d3dc..4118aab853 100644 --- a/Source/Core/DolphinWX/Src/BootManager.cpp +++ b/Source/Core/DolphinWX/Src/BootManager.cpp @@ -38,7 +38,9 @@ - +/////////////////////////////////////////////////////////////////////////////////// +// Includes +// ---------------- #include #include @@ -60,7 +62,12 @@ #include "../../../Branches/MusicMod/Main/Src/Main.h" // MusicMod #endif #endif +///////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////////// +// Declarations and definitions +// ---------------- static std::string s_DataBasePath_EUR = "Data_EUR"; static std::string s_DataBasePath_USA = "Data_USA"; static std::string s_DataBasePath_JAP = "Data_JAP"; @@ -73,9 +80,14 @@ extern CCodeWindow* g_pCodeWindow; namespace BootManager { #ifdef _WIN32 -extern "C" HINSTANCE wxGetInstance(); + extern "C" HINSTANCE wxGetInstance(); #endif +///////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////////// +// Boot the ISO or file +// ---------------- bool BootCore(const std::string& _rFilename) { SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter; @@ -111,12 +123,10 @@ bool BootCore(const std::string& _rFilename) #endif #endif - if (!StartUp.AutoSetup(SCoreStartupParameter::BOOT_DEFAULT)) - { - return false; - } + // If for example the ISO file is bad we return here + if (!StartUp.AutoSetup(SCoreStartupParameter::BOOT_DEFAULT)) return false; - // ------------------------------------------------ + // ==================================================== // Load game specific settings // ---------------- IniFile ini; @@ -180,11 +190,12 @@ bool BootCore(const std::string& _rFilename) } // --------- } - // --------- + // ============== #if defined(HAVE_WX) && HAVE_WX if(main_frame) { + // Save the window handle of the eventual parent to the rendering window StartUp.hMainWindow = main_frame->GetRenderHandle(); // Now that we know if we have a Wii game we can run this @@ -222,5 +233,7 @@ void Stop() { Core::Stop(); } +///////////////////////////////// + } // namespace