From f92d5167234426d881a2d66049b26ff7469f7f7e Mon Sep 17 00:00:00 2001 From: Valentin Vanelslande Date: Tue, 10 Oct 2017 22:35:26 -0500 Subject: [PATCH] Update main.cpp --- src/citra_qt/main.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 1e77aa6dd..ebfa667eb 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -252,6 +252,14 @@ void GMainWindow::InitializeHotkeys() { SLOT(OnStartGame())); connect(GetHotkey("Main Window", "Swap Screens", render_window), SIGNAL(activated()), this, SLOT(OnSwapScreens())); + connect(GetHotkey("Main Window", "Play/Pause", this), SIGNAL(activated()), this, + SLOT(OnRunningToggle())); +} + +void GMainWindow::OnRunningToggle() { + if (emulation_running) { + OnPauseGame(); + } } void GMainWindow::SetDefaultUIGeometry() { @@ -823,12 +831,6 @@ void GMainWindow::dragEnterEvent(QDragEnterEvent* event) { void GMainWindow::dragMoveEvent(QDragMoveEvent* event) { event->acceptProposedAction(); } - -void GMainWindow::keyPressEvent(QKeyEvent* event) { -if (event->key() == Qt::Key_F4 && emulation_running) { - OnPauseGame(); - } -} bool GMainWindow::ConfirmChangeGame() { if (emu_thread == nullptr)