From b3f57cf90da20de86db11d2e2679aeba436cf5b1 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 24 May 2023 23:18:47 -0500 Subject: [PATCH] Fix emulated Home/Guide presses being missed Fixes #1048 --- src/input.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/input.cpp b/src/input.cpp index 6688fc5c..a9a38e2d 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -19,6 +19,9 @@ extern "C" { #include "thread_pool.h" #include "utility.h" +#include +#include + using namespace std::literals; namespace input { @@ -734,6 +737,9 @@ namespace input { state.buttonFlags |= platf::HOME; platf::gamepad(platf_input, gamepad.id, state); + // Sleep for a short time to allow the input to be detected + boost::this_thread::sleep_for(boost::chrono::milliseconds(100)); + // Release Home button state.buttonFlags &= ~platf::HOME; platf::gamepad(platf_input, gamepad.id, state);