Merge pull request #5664 from ligfx/removesettings

DolphinQt2: replace Settings with SConfig where possible
This commit is contained in:
Leo Lam
2017-07-04 13:45:21 +02:00
committed by GitHub
16 changed files with 132 additions and 448 deletions

View File

@ -294,7 +294,7 @@ void MainWindow::Play()
}
else
{
QString default_path = Settings::Instance().GetDefaultGame();
auto default_path = QString::fromStdString(SConfig::GetInstance().m_strDefaultISO);
if (!default_path.isEmpty() && QFile::exists(default_path))
{
StartGame(default_path);
@ -318,7 +318,7 @@ bool MainWindow::Stop()
if (!Core::IsRunning())
return true;
if (Settings::Instance().GetConfirmStop())
if (SConfig::GetInstance().bConfirmStop)
{
const Core::State state = Core::GetState();
// Set to false when Netplay is running as a CPU thread
@ -429,8 +429,7 @@ void MainWindow::StartGame(const QString& path)
void MainWindow::ShowRenderWidget()
{
auto& settings = Settings::Instance();
if (settings.GetRenderToMain())
if (SConfig::GetInstance().bRenderToMain)
{
// If we're rendering to main, add it to the stack and update our title when necessary.
m_rendering_to_main = true;
@ -441,13 +440,13 @@ void MainWindow::ShowRenderWidget()
{
// Otherwise, just show it.
m_rendering_to_main = false;
if (settings.GetFullScreen())
if (SConfig::GetInstance().bFullscreen)
{
m_render_widget->showFullScreen();
}
else
{
m_render_widget->resize(settings.GetRenderWindowSize());
m_render_widget->resize(640, 480);
m_render_widget->showNormal();
}
}