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.
This commit is contained in:
JosJuice 2017-01-22 16:53:56 +01:00
parent c847a5258f
commit edcf6819e2
2 changed files with 8 additions and 15 deletions

View File

@ -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);
}
}

View File

@ -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