diff options
author | James Rowe <jroweboy@gmail.com> | 2016-11-05 09:58:11 +0100 |
---|---|---|
committer | James Rowe <jroweboy@gmail.com> | 2016-11-05 10:46:43 +0100 |
commit | d9305b0a074a255eb484911db70a126a6fe347b1 (patch) | |
tree | fcd629c513d4c8d217bf89069b288a39debb594f /src/citra_qt | |
parent | Rework frame layouts to use a max rectangle instead of hardcoded calculations (diff) | |
download | yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.tar yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.tar.gz yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.tar.bz2 yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.tar.lz yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.tar.xz yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.tar.zst yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.zip |
Diffstat (limited to 'src/citra_qt')
-rw-r--r-- | src/citra_qt/config.cpp | 3 | ||||
-rw-r--r-- | src/citra_qt/configure_graphics.cpp | 3 | ||||
-rw-r--r-- | src/citra_qt/main.cpp | 8 | ||||
-rw-r--r-- | src/citra_qt/main.h | 1 |
4 files changed, 13 insertions, 2 deletions
diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index f4f1a354d..3d2312619 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp @@ -55,7 +55,8 @@ void Config::ReadValues() { qt_config->endGroup(); qt_config->beginGroup("Layout"); - Settings::values.layout_option = static_cast<Settings::LayoutOption>(qt_config->value("layout_option").toInt()); + Settings::values.layout_option = + static_cast<Settings::LayoutOption>(qt_config->value("layout_option").toInt()); Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); qt_config->endGroup(); diff --git a/src/citra_qt/configure_graphics.cpp b/src/citra_qt/configure_graphics.cpp index c6c28197e..29834e11b 100644 --- a/src/citra_qt/configure_graphics.cpp +++ b/src/citra_qt/configure_graphics.cpp @@ -32,7 +32,8 @@ void ConfigureGraphics::applyConfiguration() { Settings::values.use_shader_jit = ui->toggle_shader_jit->isChecked(); Settings::values.use_scaled_resolution = ui->toggle_scaled_resolution->isChecked(); Settings::values.use_vsync = ui->toggle_vsync->isChecked(); - Settings::values.layout_option = static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex()); + Settings::values.layout_option = + static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex()); Settings::values.swap_screen = ui->swap_screen->isChecked(); Settings::Apply(); } diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 8322e2305..c1589424e 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -196,6 +196,7 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { // Setup hotkeys RegisterHotkey("Main Window", "Load File", QKeySequence::Open); + RegisterHotkey("Main Window", "Swap Screens", QKeySequence::NextChild); RegisterHotkey("Main Window", "Start Emulation"); LoadHotkeys(); @@ -203,6 +204,8 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { SLOT(OnMenuLoadFile())); connect(GetHotkey("Main Window", "Start Emulation", this), SIGNAL(activated()), this, SLOT(OnStartGame())); + connect(GetHotkey("Main Window", "Swap Screens", this), SIGNAL(activated()), this, + SLOT(OnSwapScreens())); std::string window_title = Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc); @@ -550,6 +553,11 @@ void GMainWindow::OnConfigure() { } } +void GMainWindow::OnSwapScreens() { + Settings::values.swap_screen = !Settings::values.swap_screen; + Settings::Apply(); +} + void GMainWindow::OnCreateGraphicsSurfaceViewer() { auto graphicsSurfaceViewerWidget = new GraphicsSurfaceWidget(Pica::g_debug_context, this); addDockWidget(Qt::RightDockWidgetArea, graphicsSurfaceViewerWidget); diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index 2cf308d80..82eb90aae 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -105,6 +105,7 @@ private slots: /// Called whenever a user selects the "File->Select Game List Root" menu item void OnMenuSelectGameListRoot(); void OnMenuRecentFile(); + void OnSwapScreens(); void OnConfigure(); void OnDisplayTitleBars(bool); void ToggleWindowMode(); |