summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
authorLittleWhite <lw.demoscene@googlemail.com>2016-01-24 18:34:05 +0100
committerLittleWhite <lw.demoscene@googlemail.com>2016-03-21 20:03:18 +0100
commit426c4a2a5b65ce04a767e4c514aafc182b8d5a56 (patch)
treea15f1c22d06f0511aa6edd95815bed7ad0ca693e /src/citra_qt/main.cpp
parentMerge pull request #1559 from lioncash/vec (diff)
downloadyuzu-426c4a2a5b65ce04a767e4c514aafc182b8d5a56.tar
yuzu-426c4a2a5b65ce04a767e4c514aafc182b8d5a56.tar.gz
yuzu-426c4a2a5b65ce04a767e4c514aafc182b8d5a56.tar.bz2
yuzu-426c4a2a5b65ce04a767e4c514aafc182b8d5a56.tar.lz
yuzu-426c4a2a5b65ce04a767e4c514aafc182b8d5a56.tar.xz
yuzu-426c4a2a5b65ce04a767e4c514aafc182b8d5a56.tar.zst
yuzu-426c4a2a5b65ce04a767e4c514aafc182b8d5a56.zip
Diffstat (limited to 'src/citra_qt/main.cpp')
-rw-r--r--src/citra_qt/main.cpp48
1 files changed, 9 insertions, 39 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 32cceaf7e..573036a2a 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -13,6 +13,7 @@
#include "citra_qt/bootmanager.h"
#include "citra_qt/config.h"
+#include "citra_qt/configure_dialog.h"
#include "citra_qt/game_list.h"
#include "citra_qt/hotkeys.h"
#include "citra_qt/main.h"
@@ -145,17 +146,9 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
game_list->LoadInterfaceLayout(settings);
- ui.action_Use_Gdbstub->setChecked(Settings::values.use_gdbstub);
- SetGdbstubEnabled(ui.action_Use_Gdbstub->isChecked());
-
+ GDBStub::ToggleServer(Settings::values.use_gdbstub);
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());
-
- ui.action_Use_Shader_JIT->setChecked(Settings::values.use_shader_jit);
- SetShaderJITEnabled(ui.action_Use_Shader_JIT->isChecked());
-
ui.action_Single_Window_Mode->setChecked(settings.value("singleWindowMode", true).toBool());
ToggleWindowMode();
@@ -176,17 +169,14 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
// Setup connections
connect(game_list, SIGNAL(GameChosen(QString)), this, SLOT(OnGameListLoadFile(QString)));
+ connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(OnConfigure()));
connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile()));
connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap()));
connect(ui.action_Select_Game_List_Root, SIGNAL(triggered()), this, SLOT(OnMenuSelectGameListRoot()));
connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame()));
connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame()));
connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame()));
- connect(ui.action_Use_Hardware_Renderer, SIGNAL(triggered(bool)), this, SLOT(SetHardwareRendererEnabled(bool)));
- connect(ui.action_Use_Shader_JIT, SIGNAL(triggered(bool)), this, SLOT(SetShaderJITEnabled(bool)));
- connect(ui.action_Use_Gdbstub, SIGNAL(triggered(bool)), this, SLOT(SetGdbstubEnabled(bool)));
connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(ToggleWindowMode()));
- connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog()));
connect(this, SIGNAL(EmulationStarting(EmuThread*)), disasmWidget, SLOT(OnEmulationStarting(EmuThread*)));
connect(this, SIGNAL(EmulationStopping()), disasmWidget, SLOT(OnEmulationStopping()));
@@ -496,31 +486,6 @@ void GMainWindow::OnStopGame() {
ShutdownGame();
}
-void GMainWindow::OnOpenHotkeysDialog() {
- GHotkeysDialog dialog(this);
- dialog.exec();
-}
-
-void GMainWindow::SetHardwareRendererEnabled(bool enabled) {
- VideoCore::g_hw_renderer_enabled = enabled;
-
- Config config;
- Settings::values.use_hw_renderer = enabled;
- config.Save();
-}
-
-void GMainWindow::SetGdbstubEnabled(bool enabled) {
- GDBStub::ToggleServer(enabled);
-}
-
-void GMainWindow::SetShaderJITEnabled(bool enabled) {
- VideoCore::g_shader_jit_enabled = enabled;
-
- Config config;
- Settings::values.use_shader_jit = enabled;
- config.Save();
-}
-
void GMainWindow::ToggleWindowMode() {
if (ui.action_Single_Window_Mode->isChecked()) {
// Render in the main window...
@@ -547,7 +512,12 @@ void GMainWindow::ToggleWindowMode() {
}
void GMainWindow::OnConfigure() {
- //GControllerConfigDialog* dialog = new GControllerConfigDialog(controller_ports, this);
+ ConfigureDialog configureDialog(this);
+ auto result = configureDialog.exec();
+ if ( result == QDialog::Accepted)
+ {
+ configureDialog.applyConfiguration();
+ }
}
bool GMainWindow::ConfirmClose() {