From 171679efa98c5e640b448ce78f17dd600515fa1d Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 9 Dec 2021 18:56:25 +0100 Subject: [PATCH] Filter the first 'a' button press after returning from a game when running in background. --- es-app/src/views/ViewController.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 93d146c15..5d3d10e14 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -838,6 +838,10 @@ bool ViewController::input(InputConfig* config, Input input) if (mWindow->getGameLaunchedState()) { mWindow->setAllowTextScrolling(true); mWindow->unsetLaunchedGame(); + // Filter out the "a" button so the game is not restarted if there was such a button press + // queued when leaving the game. + if (config->isMappedTo("a", input) && input.value != 0) + return true; } // Open the main menu.