diff options
author | tfarley <tfarleygithub@gmail.com> | 2015-05-19 06:21:33 +0200 |
---|---|---|
committer | tfarley <tfarleygithub@gmail.com> | 2015-05-23 00:51:18 +0200 |
commit | 05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2 (patch) | |
tree | d080c1efd3b928bda551cb9eee304547e66a4351 /src/citra_qt | |
parent | INI hw/sw renderer toggle (diff) | |
download | yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.gz yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.bz2 yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.lz yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.xz yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.zst yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.zip |
Diffstat (limited to 'src/citra_qt')
-rw-r--r-- | src/citra_qt/main.cpp | 9 | ||||
-rw-r--r-- | src/citra_qt/main.h | 1 | ||||
-rw-r--r-- | src/citra_qt/main.ui | 9 |
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 &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> |