summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-01-22 16:53:56 +0100
committerJosJuice <josjuice@gmail.com>2017-02-03 21:56:45 +0100
commitedcf6819e2e72e110b9726c85899847513e474df (patch)
tree19d0f66e9fcf96193794132330276da12b981694 /Source/Core
parentc847a5258f4f152366e61ce00865cd96cc71c80f (diff)
Don't load game INIs in Core::Init
The game INIs are already loaded in BootManager::BootCore, which is executed right before. Let's put the g_aspect_wide code there instead.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/BootManager.cpp9
-rw-r--r--Source/Core/Core/Core.cpp14
2 files changed, 8 insertions, 15 deletions
diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp
index dd3708a0c6..a437ab1856 100644
--- a/Source/Core/Core/BootManager.cpp
+++ b/Source/Core/Core/BootManager.cpp
@@ -282,9 +282,15 @@ bool BootCore(const std::string& _rFilename)
}
}
+ Core::g_aspect_wide = StartUp.bWii;
+
// Wii settings
if (StartUp.bWii)
{
+ IniFile::Section* wii_section = game_ini.GetOrCreateSection("Wii");
+ wii_section->Get("Widescreen", &Core::g_aspect_wide, !!StartUp.m_wii_aspect_ratio);
+ wii_section->Get("Language", &StartUp.m_wii_language, StartUp.m_wii_language);
+
int source;
for (unsigned int i = 0; i < MAX_WIIMOTES; ++i)
{
@@ -305,9 +311,6 @@ bool BootCore(const std::string& _rFilename)
g_wiimote_sources[WIIMOTE_BALANCE_BOARD] = source;
WiimoteReal::ChangeWiimoteSource(WIIMOTE_BALANCE_BOARD, source);
}
-
- IniFile::Section* wii_section = game_ini.GetOrCreateSection("Wii");
- wii_section->Get("Language", &StartUp.m_wii_language, StartUp.m_wii_language);
}
}
diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp
index c32b0b6d33..18cda8c4f0 100644
--- a/Source/Core/Core/Core.cpp
+++ b/Source/Core/Core/Core.cpp
@@ -230,8 +230,6 @@ bool IsGPUThread()
// BootManager.cpp
bool Init()
{
- const SConfig& _CoreParameter = SConfig::GetInstance();
-
if (s_emu_thread.joinable())
{
if (IsRunning())
@@ -249,19 +247,11 @@ bool Init()
Core::UpdateWantDeterminism(/*initial*/ true);
- INFO_LOG(OSREPORT, "Starting core = %s mode", _CoreParameter.bWii ? "Wii" : "GameCube");
- INFO_LOG(OSREPORT, "CPU Thread separate = %s", _CoreParameter.bCPUThread ? "Yes" : "No");
+ INFO_LOG(OSREPORT, "Starting core = %s mode", SConfig::GetInstance().bWii ? "Wii" : "GameCube");
+ INFO_LOG(OSREPORT, "CPU Thread separate = %s", SConfig::GetInstance().bCPUThread ? "Yes" : "No");
Host_UpdateMainFrame(); // Disable any menus or buttons at boot
- g_aspect_wide = _CoreParameter.bWii;
- if (g_aspect_wide)
- {
- IniFile gameIni = _CoreParameter.LoadGameIni();
- gameIni.GetOrCreateSection("Wii")->Get("Widescreen", &g_aspect_wide,
- !!SConfig::GetInstance().m_wii_aspect_ratio);
- }
-
s_window_handle = Host_GetRenderHandle();
// Start the emu thread