From 7268dcdbca9cb1aa6468d8a0c13fe89da1eb678c Mon Sep 17 00:00:00 2001 From: Ryan Wong Date: Sat, 27 May 2023 14:47:32 +0800 Subject: [PATCH] input_common: set input thread delay of joycon to 15ms Signed-off-by: Ryan Wong --- src/input_common/helpers/joycon_driver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/input_common/helpers/joycon_driver.cpp b/src/input_common/helpers/joycon_driver.cpp index 95106f16d8..e36dc2ef80 100644 --- a/src/input_common/helpers/joycon_driver.cpp +++ b/src/input_common/helpers/joycon_driver.cpp @@ -128,8 +128,9 @@ void JoyconDriver::InputThread(std::stop_token stop_token) { Common::SetCurrentThreadName("JoyconInput"); input_thread_running = true; - // Max update rate is 5ms, ensure we are always able to read a bit faster - constexpr int ThreadDelay = 2; + // Max update rate is 5ms, but in normal the console asks Joy-Con for an update + // every 15ms, this can help reducing CPU pressure on some weak platform + constexpr int ThreadDelay = 15; std::vector buffer(MaxBufferSize); while (!stop_token.stop_requested()) {