aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/qt_sdl/Input.cpp5
-rw-r--r--src/frontend/qt_sdl/Input.h1
-rw-r--r--src/frontend/qt_sdl/Window.cpp1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/Input.cpp b/src/frontend/qt_sdl/Input.cpp
index c429cd3..27c42e9 100644
--- a/src/frontend/qt_sdl/Input.cpp
+++ b/src/frontend/qt_sdl/Input.cpp
@@ -128,6 +128,11 @@ void KeyRelease(QKeyEvent* event)
KeyHotkeyMask &= ~(1<<i);
}
+void KeyReleaseAll()
+{
+ KeyInputMask = 0xFFF;
+ KeyHotkeyMask = 0;
+}
bool JoystickButtonDown(int val)
{
diff --git a/src/frontend/qt_sdl/Input.h b/src/frontend/qt_sdl/Input.h
index 2dfa4a7..5a38756 100644
--- a/src/frontend/qt_sdl/Input.h
+++ b/src/frontend/qt_sdl/Input.h
@@ -40,6 +40,7 @@ void CloseJoystick();
void KeyPress(QKeyEvent* event);
void KeyRelease(QKeyEvent* event);
+void KeyReleaseAll();
void Process();
diff --git a/src/frontend/qt_sdl/Window.cpp b/src/frontend/qt_sdl/Window.cpp
index 0f0b71f..fde29b6 100644
--- a/src/frontend/qt_sdl/Window.cpp
+++ b/src/frontend/qt_sdl/Window.cpp
@@ -916,6 +916,7 @@ void MainWindow::onAppStateChanged(Qt::ApplicationState state)
{
if (state == Qt::ApplicationInactive)
{
+ Input::KeyReleaseAll();
if (Config::PauseLostFocus && emuThread->emuIsRunning())
emuThread->emuPause();
}