From 34081e73a62bf6700c01ea7f9015e75304ab5615 Mon Sep 17 00:00:00 2001 From: Kloen Date: Thu, 17 Mar 2016 11:09:18 +0100 Subject: [PATCH] Citra-Qt: Avoid warnings when loading the configuration --- src/citra_qt/config.cpp | 6 +++++- src/citra_qt/main.cpp | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index 8e247ff5c..b0d22ff02 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp @@ -9,13 +9,17 @@ #include "citra_qt/config.h" #include "common/file_util.h" +#include "common/logging/log.h" #include "core/settings.h" Config::Config() { // TODO: Don't hardcode the path; let the frontend decide where to put the config files. qt_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "qt-config.ini"; - FileUtil::CreateFullPath(qt_config_loc); + if (!FileUtil::Exists(qt_config_loc)) + FileUtil::CreateFullPath(qt_config_loc); + else + LOG_INFO(Config, "Configuration loaded."); qt_config = new QSettings(QString::fromStdString(qt_config_loc), QSettings::IniFormat); Reload(); diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 32cceaf7e..3ae9dce07 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -151,10 +151,10 @@ GMainWindow::GMainWindow() : emu_thread(nullptr) GDBStub::SetServerPort(static_cast(Settings::values.gdbstub_port)); ui.action_Use_Hardware_Renderer->setChecked(Settings::values.use_hw_renderer); - SetHardwareRendererEnabled(ui.action_Use_Hardware_Renderer->isChecked()); + VideoCore::g_hw_renderer_enabled = ui.action_Use_Hardware_Renderer->isChecked(); ui.action_Use_Shader_JIT->setChecked(Settings::values.use_shader_jit); - SetShaderJITEnabled(ui.action_Use_Shader_JIT->isChecked()); + VideoCore::g_shader_jit_enabled = ui.action_Use_Shader_JIT->isChecked(); ui.action_Single_Window_Mode->setChecked(settings.value("singleWindowMode", true).toBool()); ToggleWindowMode();