summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/CMakeLists.txt15
-rw-r--r--src/citra_qt/configure.ui109
-rw-r--r--src/citra_qt/configure_debug.cpp33
-rw-r--r--src/citra_qt/configure_debug.h31
-rw-r--r--src/citra_qt/configure_debug.ui76
-rw-r--r--src/citra_qt/configure_dialog.cpp32
-rw-r--r--src/citra_qt/configure_dialog.h31
-rw-r--r--src/citra_qt/configure_general.cpp40
-rw-r--r--src/citra_qt/configure_general.h31
-rw-r--r--src/citra_qt/configure_general.ui96
-rw-r--r--src/citra_qt/hotkeys.cpp2
-rw-r--r--src/citra_qt/hotkeys.h2
-rw-r--r--src/citra_qt/hotkeys.ui47
-rw-r--r--src/citra_qt/main.cpp48
-rw-r--r--src/citra_qt/main.h4
-rw-r--r--src/citra_qt/main.ui51
-rw-r--r--src/citra_qt/ui_settings.cpp11
-rw-r--r--src/citra_qt/ui_settings.h16
18 files changed, 533 insertions, 142 deletions
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt
index 9b3eb2cd6..6660d9879 100644
--- a/src/citra_qt/CMakeLists.txt
+++ b/src/citra_qt/CMakeLists.txt
@@ -17,12 +17,16 @@ set(SRCS
debugger/profiler.cpp
debugger/ramview.cpp
debugger/registers.cpp
- game_list.cpp
util/spinbox.cpp
util/util.cpp
bootmanager.cpp
+ configure_debug.cpp
+ configure_dialog.cpp
+ configure_general.cpp
+ game_list.cpp
hotkeys.cpp
main.cpp
+ ui_settings.cpp
citra-qt.rc
Info.plist
)
@@ -44,12 +48,16 @@ set(HEADERS
debugger/profiler.h
debugger/ramview.h
debugger/registers.h
- game_list.h
util/spinbox.h
util/util.h
bootmanager.h
+ configure_debug.h
+ configure_dialog.h
+ configure_general.h
+ game_list.h
hotkeys.h
main.h
+ ui_settings.h
version.h
)
@@ -59,6 +67,9 @@ set(UIS
debugger/disassembler.ui
debugger/profiler.ui
debugger/registers.ui
+ configure.ui
+ configure_debug.ui
+ configure_general.ui
hotkeys.ui
main.ui
)
diff --git a/src/citra_qt/configure.ui b/src/citra_qt/configure.ui
new file mode 100644
index 000000000..e4ac9a7d8
--- /dev/null
+++ b/src/citra_qt/configure.ui
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ConfigureDialog</class>
+ <widget class="QDialog" name="ConfigureDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>441</width>
+ <height>401</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>370</width>
+ <height>219</height>
+ </size>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="minimumSize">
+ <size>
+ <width>371</width>
+ <height>221</height>
+ </size>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="ConfigureGeneral" name="generalTab">
+ <attribute name="title">
+ <string>General</string>
+ </attribute>
+ </widget>
+ <widget class="QWidget" name="inputTab">
+ <attribute name="title">
+ <string>Input</string>
+ </attribute>
+ </widget>
+ <widget class="ConfigureDebug" name="debugTab">
+ <attribute name="title">
+ <string>Debug</string>
+ </attribute>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>ConfigureGeneral</class>
+ <extends>QWidget</extends>
+ <header>configure_general.h</header>
+ <container>1</container>
+ </customwidget>
+ <customwidget>
+ <class>ConfigureDebug</class>
+ <extends>QWidget</extends>
+ <header>configure_debug.h</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>ConfigureDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>220</x>
+ <y>380</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>220</x>
+ <y>200</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>ConfigureDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>220</x>
+ <y>380</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>220</x>
+ <y>200</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/src/citra_qt/configure_debug.cpp b/src/citra_qt/configure_debug.cpp
new file mode 100644
index 000000000..f8ff804b2
--- /dev/null
+++ b/src/citra_qt/configure_debug.cpp
@@ -0,0 +1,33 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/core.h"
+#include "core/gdbstub/gdbstub.h" // TODO: can't include gdbstub without core.h
+#include "core/settings.h"
+
+#include "configure_debug.h"
+#include "ui_configure_debug.h"
+
+ConfigureDebug::ConfigureDebug(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::ConfigureDebug)
+{
+ ui->setupUi(this);
+ this->setConfiguration();
+}
+
+ConfigureDebug::~ConfigureDebug() {
+ delete ui;
+}
+
+void ConfigureDebug::setConfiguration() {
+ ui->toogleGDBStub->setChecked(Settings::values.use_gdbstub);
+ ui->GDBPortSpinBox->setValue(Settings::values.gdbstub_port);
+}
+
+void ConfigureDebug::applyConfiguration() {
+ GDBStub::ToggleServer(ui->toogleGDBStub->isChecked());
+ Settings::values.use_gdbstub = ui->toogleGDBStub->isChecked();
+ Settings::values.gdbstub_port = ui->GDBPortSpinBox->value();
+}
diff --git a/src/citra_qt/configure_debug.h b/src/citra_qt/configure_debug.h
new file mode 100644
index 000000000..9b7080d92
--- /dev/null
+++ b/src/citra_qt/configure_debug.h
@@ -0,0 +1,31 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#ifndef CONFIGURE_DEBUG_H
+#define CONFIGURE_DEBUG_H
+
+#include <QWidget>
+
+namespace Ui {
+class ConfigureDebug;
+}
+
+class ConfigureDebug : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit ConfigureDebug(QWidget *parent = 0);
+ ~ConfigureDebug();
+
+ void applyConfiguration();
+
+private:
+ void setConfiguration();
+
+private:
+ Ui::ConfigureDebug *ui;
+};
+
+#endif // CONFIGURE_DEBUG_H
diff --git a/src/citra_qt/configure_debug.ui b/src/citra_qt/configure_debug.ui
new file mode 100644
index 000000000..80acf6e31
--- /dev/null
+++ b/src/citra_qt/configure_debug.ui
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ConfigureDebug</class>
+ <widget class="QWidget" name="ConfigureDebug">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>GDB</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QCheckBox" name="toogleGDBStub">
+ <property name="text">
+ <string>Enable GDB Stub</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Port:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="GDBPortSpinBox">
+ <property name="maximum">
+ <number>65536</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/citra_qt/configure_dialog.cpp b/src/citra_qt/configure_dialog.cpp
new file mode 100644
index 000000000..ae442adcd
--- /dev/null
+++ b/src/citra_qt/configure_dialog.cpp
@@ -0,0 +1,32 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "configure_dialog.h"
+#include "ui_configure.h"
+
+#include "config.h"
+
+#include "core/settings.h"
+
+ConfigureDialog::ConfigureDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::ConfigureDialog)
+{
+ ui->setupUi(this);
+ this->setConfiguration();
+}
+
+ConfigureDialog::~ConfigureDialog() {
+ delete ui;
+}
+
+void ConfigureDialog::setConfiguration() {
+}
+
+void ConfigureDialog::applyConfiguration() {
+ Config config;
+ ui->generalTab->applyConfiguration();
+ ui->debugTab->applyConfiguration();
+ config.Save();
+}
diff --git a/src/citra_qt/configure_dialog.h b/src/citra_qt/configure_dialog.h
new file mode 100644
index 000000000..d66049340
--- /dev/null
+++ b/src/citra_qt/configure_dialog.h
@@ -0,0 +1,31 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#ifndef CONFIGURE_DIALOG_H
+#define CONFIGURE_DIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+class ConfigureDialog;
+}
+
+class ConfigureDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit ConfigureDialog(QWidget *parent = 0);
+ ~ConfigureDialog();
+
+ void applyConfiguration();
+
+private:
+ void setConfiguration();
+
+private:
+ Ui::ConfigureDialog *ui;
+};
+
+#endif // CONFIGURE_DIALOG_H
diff --git a/src/citra_qt/configure_general.cpp b/src/citra_qt/configure_general.cpp
new file mode 100644
index 000000000..71d992ebe
--- /dev/null
+++ b/src/citra_qt/configure_general.cpp
@@ -0,0 +1,40 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "citra_qt/configure_general.h"
+#include "citra_qt/ui_configure_general.h"
+#include "citra_qt/ui_settings.h"
+
+#include "core/settings.h"
+
+#include "video_core/video_core.h"
+
+ConfigureGeneral::ConfigureGeneral(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::ConfigureGeneral)
+{
+ ui->setupUi(this);
+ this->setConfiguration();
+}
+
+ConfigureGeneral::~ConfigureGeneral()
+{
+ delete ui;
+}
+
+void ConfigureGeneral::setConfiguration() {
+ ui->toogleCheckExit->setChecked(UISettings::values.check_closure);
+ ui->toogleHWRenderer->setChecked(Settings::values.use_hw_renderer);
+ ui->toogleShaderJIT->setChecked(Settings::values.use_shader_jit);
+}
+
+void ConfigureGeneral::applyConfiguration() {
+ UISettings::values.check_closure = ui->toogleCheckExit->isChecked();
+
+ VideoCore::g_hw_renderer_enabled =
+ Settings::values.use_hw_renderer = ui->toogleHWRenderer->isChecked();
+
+ VideoCore::g_shader_jit_enabled =
+ Settings::values.use_shader_jit = ui->toogleShaderJIT->isChecked();
+}
diff --git a/src/citra_qt/configure_general.h b/src/citra_qt/configure_general.h
new file mode 100644
index 000000000..0f3b69332
--- /dev/null
+++ b/src/citra_qt/configure_general.h
@@ -0,0 +1,31 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#ifndef CONFIGURE_GENERAL_H
+#define CONFIGURE_GENERAL_H
+
+#include <QWidget>
+
+namespace Ui {
+class ConfigureGeneral;
+}
+
+class ConfigureGeneral : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit ConfigureGeneral(QWidget *parent = 0);
+ ~ConfigureGeneral();
+
+ void applyConfiguration();
+
+private:
+ void setConfiguration();
+
+private:
+ Ui::ConfigureGeneral *ui;
+};
+
+#endif // CONFIGURE_GENERAL_H
diff --git a/src/citra_qt/configure_general.ui b/src/citra_qt/configure_general.ui
new file mode 100644
index 000000000..f847d3c6c
--- /dev/null
+++ b/src/citra_qt/configure_general.ui
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ConfigureGeneral</class>
+ <widget class="QWidget" name="ConfigureGeneral">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>284</width>
+ <height>377</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>General</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QCheckBox" name="toogleCheckExit">
+ <property name="text">
+ <string>Confirm exit while emulation is running</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>Performance</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QCheckBox" name="toogleHWRenderer">
+ <property name="text">
+ <string>Enable hardware renderer</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="toogleShaderJIT">
+ <property name="text">
+ <string>Enable Shader JIT</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="title">
+ <string>Hotkeys</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <widget class="GHotkeysDialog" name="widget" native="true"/>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>GHotkeysDialog</class>
+ <extends>QWidget</extends>
+ <header>hotkeys.h</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/citra_qt/hotkeys.cpp b/src/citra_qt/hotkeys.cpp
index ed6b12fc4..929ba6f0e 100644
--- a/src/citra_qt/hotkeys.cpp
+++ b/src/citra_qt/hotkeys.cpp
@@ -94,7 +94,7 @@ QShortcut* GetHotkey(const QString& group, const QString& action, QWidget* widge
}
-GHotkeysDialog::GHotkeysDialog(QWidget* parent): QDialog(parent)
+GHotkeysDialog::GHotkeysDialog(QWidget* parent): QWidget(parent)
{
ui.setupUi(this);
diff --git a/src/citra_qt/hotkeys.h b/src/citra_qt/hotkeys.h
index 2fe635882..50e6cbc21 100644
--- a/src/citra_qt/hotkeys.h
+++ b/src/citra_qt/hotkeys.h
@@ -42,7 +42,7 @@ void SaveHotkeys(QSettings& settings);
*/
void LoadHotkeys(QSettings& settings);
-class GHotkeysDialog : public QDialog
+class GHotkeysDialog : public QWidget
{
Q_OBJECT
diff --git a/src/citra_qt/hotkeys.ui b/src/citra_qt/hotkeys.ui
index 38a9a14d1..050fe064e 100644
--- a/src/citra_qt/hotkeys.ui
+++ b/src/citra_qt/hotkeys.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>hotkeys</class>
- <widget class="QDialog" name="hotkeys">
+ <widget class="QWidget" name="hotkeys">
<property name="geometry">
<rect>
<x>0</x>
@@ -39,51 +39,8 @@
</column>
</widget>
</item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
- </property>
- </widget>
- </item>
</layout>
</widget>
<resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>hotkeys</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel">
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>hotkeys</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>
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() {
diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h
index 6e4e56689..7fe425b40 100644
--- a/src/citra_qt/main.h
+++ b/src/citra_qt/main.h
@@ -104,12 +104,8 @@ private slots:
/// Called whenever a user selects the "File->Select Game List Root" menu item
void OnMenuSelectGameListRoot();
void OnMenuRecentFile();
- void OnOpenHotkeysDialog();
void OnConfigure();
void OnDisplayTitleBars(bool);
- void SetHardwareRendererEnabled(bool);
- void SetGdbstubEnabled(bool);
- void SetShaderJITEnabled(bool);
void ToggleWindowMode();
private:
diff --git a/src/citra_qt/main.ui b/src/citra_qt/main.ui
index 1e8a07cfb..441e0b81e 100644
--- a/src/citra_qt/main.ui
+++ b/src/citra_qt/main.ui
@@ -45,7 +45,7 @@
<x>0</x>
<y>0</y>
<width>1081</width>
- <height>22</height>
+ <height>19</height>
</rect>
</property>
<widget class="QMenu" name="menu_File">
@@ -73,9 +73,6 @@
<addaction name="action_Pause"/>
<addaction name="action_Stop"/>
<addaction name="separator"/>
- <addaction name="action_Use_Hardware_Renderer"/>
- <addaction name="action_Use_Shader_JIT"/>
- <addaction name="action_Use_Gdbstub"/>
<addaction name="action_Configure"/>
</widget>
<widget class="QMenu" name="menu_View">
@@ -84,7 +81,6 @@
</property>
<addaction name="action_Single_Window_Mode"/>
<addaction name="actionDisplay_widget_title_bars"/>
- <addaction name="action_Hotkeys"/>
</widget>
<widget class="QMenu" name="menu_Help">
<property name="title">
@@ -150,35 +146,6 @@
<string>Single Window Mode</string>
</property>
</action>
- <action name="action_Hotkeys">
- <property name="text">
- <string>Configure &amp;Hotkeys ...</string>
- </property>
- </action>
- <action name="action_Use_Hardware_Renderer">
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Use Hardware Renderer</string>
- </property>
- </action>
- <action name="action_Use_Shader_JIT">
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Use Shader JIT</string>
- </property>
- </action>
- <action name="action_Use_Gdbstub">
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Use Gdbstub</string>
- </property>
- </action>
<action name="action_Configure">
<property name="text">
<string>Configure ...</string>
@@ -220,22 +187,6 @@
</hints>
</connection>
<connection>
- <sender>action_Configure</sender>
- <signal>triggered()</signal>
- <receiver>MainWindow</receiver>
- <slot>OnConfigure()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>-1</x>
- <y>-1</y>
- </hint>
- <hint type="destinationlabel">
- <x>540</x>
- <y>364</y>
- </hint>
- </hints>
- </connection>
- <connection>
<sender>actionDisplay_widget_title_bars</sender>
<signal>triggered(bool)</signal>
<receiver>MainWindow</receiver>
diff --git a/src/citra_qt/ui_settings.cpp b/src/citra_qt/ui_settings.cpp
new file mode 100644
index 000000000..5f2215899
--- /dev/null
+++ b/src/citra_qt/ui_settings.cpp
@@ -0,0 +1,11 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "ui_settings.h"
+
+namespace UISettings {
+
+Values values = {};
+
+}
diff --git a/src/citra_qt/ui_settings.h b/src/citra_qt/ui_settings.h
new file mode 100644
index 000000000..f0afbf2d3
--- /dev/null
+++ b/src/citra_qt/ui_settings.h
@@ -0,0 +1,16 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#ifndef UISETTINGS_H
+#define UISETTINGS_H
+
+namespace UISettings {
+
+struct Values {
+ bool check_closure;
+} extern values;
+
+}
+
+#endif // UISETTINGS_H