Release all keyboard keys on focus loss (fixes #1987)

This commit is contained in:
Nadia Holmquist Pedersen
2024-02-25 14:25:50 +01:00
parent 21e2a876ec
commit 67ca4997e2
3 changed files with 7 additions and 0 deletions

View File

@ -916,6 +916,7 @@ void MainWindow::onAppStateChanged(Qt::ApplicationState state)
{
if (state == Qt::ApplicationInactive)
{
Input::KeyReleaseAll();
if (Config::PauseLostFocus && emuThread->emuIsRunning())
emuThread->emuPause();
}