summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorspycrab <spycrab@users.noreply.github.com>2018-05-09 08:27:04 +0200
committerspycrab <spycrab@users.noreply.github.com>2018-05-09 08:27:04 +0200
commitce32447726bc8da0028dccae45331afe72e3125d (patch)
tree0683e46607ff158d0dcf1f89466264895426f9a8 /Source/Core
parentcb02a4bb95c49acfcffd75335a77717129c8d25b (diff)
Qt: Implement missing hotkeys
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinQt2/HotkeyScheduler.cpp11
-rw-r--r--Source/Core/DolphinQt2/HotkeyScheduler.h4
-rw-r--r--Source/Core/DolphinQt2/MainWindow.cpp3
3 files changed, 18 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt2/HotkeyScheduler.cpp b/Source/Core/DolphinQt2/HotkeyScheduler.cpp
index 19785b2ab0..8cf73b6b29 100644
--- a/Source/Core/DolphinQt2/HotkeyScheduler.cpp
+++ b/Source/Core/DolphinQt2/HotkeyScheduler.cpp
@@ -138,6 +138,17 @@ void HotkeyScheduler::Run()
if (!Core::IsRunningAndStarted())
continue;
+ if (IsHotkey(HK_OPEN))
+ emit Open();
+
+ // Disc
+
+ if (IsHotkey(HK_EJECT_DISC))
+ emit EjectDisc();
+
+ if (IsHotkey(HK_CHANGE_DISC))
+ emit ChangeDisc();
+
// Fullscreen
if (IsHotkey(HK_FULLSCREEN))
emit FullScreenHotkey();
diff --git a/Source/Core/DolphinQt2/HotkeyScheduler.h b/Source/Core/DolphinQt2/HotkeyScheduler.h
index 13f0f7972d..e8e8c6602a 100644
--- a/Source/Core/DolphinQt2/HotkeyScheduler.h
+++ b/Source/Core/DolphinQt2/HotkeyScheduler.h
@@ -20,6 +20,10 @@ public:
void Start();
void Stop();
signals:
+ void Open();
+ void EjectDisc();
+ void ChangeDisc();
+
void ExitHotkey();
void FullScreenHotkey();
void StopHotkey();
diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp
index af820bf582..4938d43de1 100644
--- a/Source/Core/DolphinQt2/MainWindow.cpp
+++ b/Source/Core/DolphinQt2/MainWindow.cpp
@@ -334,6 +334,9 @@ void MainWindow::ConnectMenuBar()
void MainWindow::ConnectHotkeys()
{
+ connect(m_hotkey_scheduler, &HotkeyScheduler::Open, this, &MainWindow::Open);
+ connect(m_hotkey_scheduler, &HotkeyScheduler::ChangeDisc, this, &MainWindow::ChangeDisc);
+ connect(m_hotkey_scheduler, &HotkeyScheduler::EjectDisc, this, &MainWindow::EjectDisc);
connect(m_hotkey_scheduler, &HotkeyScheduler::ExitHotkey, this, &MainWindow::close);
connect(m_hotkey_scheduler, &HotkeyScheduler::TogglePauseHotkey, this, &MainWindow::TogglePause);
connect(m_hotkey_scheduler, &HotkeyScheduler::StopHotkey, this, &MainWindow::RequestStop);