Migrate global init stuff into UICommon.

This avoids code duplication in a bunch of places .
I also moved the NVIDIA Optimus export into VideoCommon.
This commit is contained in:
Augustin Cavalier
2014-10-04 15:12:15 -04:00
parent 669a118063
commit 19109e2d01
12 changed files with 170 additions and 60 deletions

View File

@ -22,6 +22,8 @@
#include "Core/HW/Wiimote.h"
#include "Core/PowerPC/PowerPC.h"
#include "UICommon/UICommon.h"
#include "VideoCommon/VideoBackendBase.h"
static bool rendererHasFocus = true;
@ -347,12 +349,7 @@ int main(int argc, char* argv[])
return 1;
}
LogManager::Init();
SConfig::Init();
VideoBackend::PopulateList();
VideoBackend::ActivateBackend(SConfig::GetInstance().
m_LocalCoreStartupParameter.m_strVideoBackend);
WiimoteReal::LoadSettings();
UICommon::Init();
platform->Init();
@ -372,10 +369,7 @@ int main(int argc, char* argv[])
platform->Shutdown();
Core::Shutdown();
WiimoteReal::Shutdown();
VideoBackend::ClearList();
SConfig::Shutdown();
LogManager::Shutdown();
UICommon::Shutdown();
delete platform;