summaryrefslogtreecommitdiff
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
authorGravatar James Rowe2016-11-05 02:58:11 -0600
committerGravatar James Rowe2016-11-05 03:46:43 -0600
commitd9305b0a074a255eb484911db70a126a6fe347b1 (patch)
treefcd629c513d4c8d217bf89069b288a39debb594f /src/citra_qt/main.cpp
parentRework frame layouts to use a max rectangle instead of hardcoded calculations (diff)
downloadyuzu-d9305b0a074a255eb484911db70a126a6fe347b1.tar.gz
yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.tar.xz
yuzu-d9305b0a074a255eb484911db70a126a6fe347b1.zip
Add default hotkey to swap primary screens.
Also minor style changes
Diffstat (limited to 'src/citra_qt/main.cpp')
-rw-r--r--src/citra_qt/main.cpp8
1 files changed, 8 insertions, 0 deletions
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
556void GMainWindow::OnSwapScreens() {
557 Settings::values.swap_screen = !Settings::values.swap_screen;
558 Settings::Apply();
559}
560
553void GMainWindow::OnCreateGraphicsSurfaceViewer() { 561void 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);