summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/main.cpp9
-rw-r--r--src/citra_qt/main.h1
-rw-r--r--src/citra_qt/main.ui9
3 files changed, 19 insertions, 0 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 24506deab..2ea33ebc5 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -44,6 +44,8 @@
#include "core/arm/disassembler/load_symbol_map.h"
#include "citra_qt/config.h"
+#include "video_core/video_core.h"
+
#include "version.h"
GMainWindow::GMainWindow() : emu_thread(nullptr)
@@ -123,6 +125,9 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
restoreState(settings.value("state").toByteArray());
render_window->restoreGeometry(settings.value("geometryRenderWindow").toByteArray());
+ ui.action_Use_Hardware_Renderer->setChecked(Settings::values.use_hw_renderer);
+ SetHardwareRendererEnabled(ui.action_Use_Hardware_Renderer->isChecked());
+
ui.action_Single_Window_Mode->setChecked(settings.value("singleWindowMode", true).toBool());
ToggleWindowMode();
@@ -135,6 +140,7 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
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_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(ToggleWindowMode()));
connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog()));
@@ -300,6 +306,9 @@ void GMainWindow::OnOpenHotkeysDialog()
dialog.exec();
}
+void GMainWindow::SetHardwareRendererEnabled(bool enabled) {
+ VideoCore::g_hw_renderer_enabled = enabled;
+}
void GMainWindow::ToggleWindowMode() {
if (ui.action_Single_Window_Mode->isChecked()) {
diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h
index 3e29534fb..242b08c39 100644
--- a/src/citra_qt/main.h
+++ b/src/citra_qt/main.h
@@ -69,6 +69,7 @@ private slots:
void OnOpenHotkeysDialog();
void OnConfigure();
void OnDisplayTitleBars(bool);
+ void SetHardwareRendererEnabled(bool);
void ToggleWindowMode();
private:
diff --git a/src/citra_qt/main.ui b/src/citra_qt/main.ui
index 689806465..0942c28c8 100644
--- a/src/citra_qt/main.ui
+++ b/src/citra_qt/main.ui
@@ -52,6 +52,7 @@
<addaction name="action_Pause"/>
<addaction name="action_Stop"/>
<addaction name="separator"/>
+ <addaction name="action_Use_Hardware_Renderer"/>
<addaction name="action_Configure"/>
</widget>
<widget class="QMenu" name="menu_View">
@@ -131,6 +132,14 @@
<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_Configure">
<property name="text">
<string>Configure ...</string>