Citra-Qt: Avoid warnings when loading the configuration

This commit is contained in:
Kloen 2016-03-17 11:09:18 +01:00
parent de7ecee516
commit 34081e73a6
2 changed files with 7 additions and 3 deletions

View File

@ -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";
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();

View File

@ -151,10 +151,10 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
GDBStub::SetServerPort(static_cast<u32>(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();