From d9305b0a074a255eb484911db70a126a6fe347b1 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Sat, 5 Nov 2016 02:58:11 -0600 Subject: Add default hotkey to swap primary screens. Also minor style changes --- src/citra_qt/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/citra_qt/main.cpp') 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); -- cgit v1.2.3