diff options
| author | 2016-11-05 02:58:11 -0600 | |
|---|---|---|
| committer | 2016-11-05 03:46:43 -0600 | |
| 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.gz yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.tar.xz yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.zip | |
Add default hotkey to swap primary screens.
Also minor style changes
Diffstat (limited to '')
| -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() { | |||
| 55 | qt_config->endGroup(); | 55 | qt_config->endGroup(); |
| 56 | 56 | ||
| 57 | qt_config->beginGroup("Layout"); | 57 | qt_config->beginGroup("Layout"); |
| 58 | Settings::values.layout_option = static_cast<Settings::LayoutOption>(qt_config->value("layout_option").toInt()); | 58 | Settings::values.layout_option = |
| 59 | static_cast<Settings::LayoutOption>(qt_config->value("layout_option").toInt()); | ||
| 59 | Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); | 60 | Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); |
| 60 | qt_config->endGroup(); | 61 | qt_config->endGroup(); |
| 61 | 62 | ||
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() { | |||
| 32 | Settings::values.use_shader_jit = ui->toggle_shader_jit->isChecked(); | 32 | Settings::values.use_shader_jit = ui->toggle_shader_jit->isChecked(); |
| 33 | Settings::values.use_scaled_resolution = ui->toggle_scaled_resolution->isChecked(); | 33 | Settings::values.use_scaled_resolution = ui->toggle_scaled_resolution->isChecked(); |
| 34 | Settings::values.use_vsync = ui->toggle_vsync->isChecked(); | 34 | Settings::values.use_vsync = ui->toggle_vsync->isChecked(); |
| 35 | Settings::values.layout_option = static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex()); | 35 | Settings::values.layout_option = |
| 36 | static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex()); | ||
| 36 | Settings::values.swap_screen = ui->swap_screen->isChecked(); | 37 | Settings::values.swap_screen = ui->swap_screen->isChecked(); |
| 37 | Settings::Apply(); | 38 | Settings::Apply(); |
| 38 | } | 39 | } |
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) { | |||
| 196 | 196 | ||
| 197 | // Setup hotkeys | 197 | // Setup hotkeys |
| 198 | RegisterHotkey("Main Window", "Load File", QKeySequence::Open); | 198 | RegisterHotkey("Main Window", "Load File", QKeySequence::Open); |
| 199 | RegisterHotkey("Main Window", "Swap Screens", QKeySequence::NextChild); | ||
| 199 | RegisterHotkey("Main Window", "Start Emulation"); | 200 | RegisterHotkey("Main Window", "Start Emulation"); |
| 200 | LoadHotkeys(); | 201 | LoadHotkeys(); |
| 201 | 202 | ||
| @@ -203,6 +204,8 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) { | |||
| 203 | SLOT(OnMenuLoadFile())); | 204 | SLOT(OnMenuLoadFile())); |
| 204 | connect(GetHotkey("Main Window", "Start Emulation", this), SIGNAL(activated()), this, | 205 | connect(GetHotkey("Main Window", "Start Emulation", this), SIGNAL(activated()), this, |
| 205 | SLOT(OnStartGame())); | 206 | SLOT(OnStartGame())); |
| 207 | connect(GetHotkey("Main Window", "Swap Screens", this), SIGNAL(activated()), this, | ||
| 208 | SLOT(OnSwapScreens())); | ||
| 206 | 209 | ||
| 207 | std::string window_title = | 210 | std::string window_title = |
| 208 | Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc); | 211 | Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc); |
| @@ -550,6 +553,11 @@ void GMainWindow::OnConfigure() { | |||
| 550 | } | 553 | } |
| 551 | } | 554 | } |
| 552 | 555 | ||
| 556 | void GMainWindow::OnSwapScreens() { | ||
| 557 | Settings::values.swap_screen = !Settings::values.swap_screen; | ||
| 558 | Settings::Apply(); | ||
| 559 | } | ||
| 560 | |||
| 553 | void GMainWindow::OnCreateGraphicsSurfaceViewer() { | 561 | void GMainWindow::OnCreateGraphicsSurfaceViewer() { |
| 554 | auto graphicsSurfaceViewerWidget = new GraphicsSurfaceWidget(Pica::g_debug_context, this); | 562 | auto graphicsSurfaceViewerWidget = new GraphicsSurfaceWidget(Pica::g_debug_context, this); |
| 555 | addDockWidget(Qt::RightDockWidgetArea, graphicsSurfaceViewerWidget); | 563 | 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: | |||
| 105 | /// Called whenever a user selects the "File->Select Game List Root" menu item | 105 | /// Called whenever a user selects the "File->Select Game List Root" menu item |
| 106 | void OnMenuSelectGameListRoot(); | 106 | void OnMenuSelectGameListRoot(); |
| 107 | void OnMenuRecentFile(); | 107 | void OnMenuRecentFile(); |
| 108 | void OnSwapScreens(); | ||
| 108 | void OnConfigure(); | 109 | void OnConfigure(); |
| 109 | void OnDisplayTitleBars(bool); | 110 | void OnDisplayTitleBars(bool); |
| 110 | void ToggleWindowMode(); | 111 | void ToggleWindowMode(); |