From 8da919f411d27772d3c92645d99be9b029ed703f Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 24 May 2023 23:21:01 -0500 Subject: [PATCH] Rename Back Button Timeout and disable it by default Users don't expect long presses of the back button to not work out of the box. --- docs/source/about/advanced_usage.rst | 6 ++---- src/config.cpp | 2 +- src_assets/common/assets/web/config.html | 12 +++++------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/docs/source/about/advanced_usage.rst b/docs/source/about/advanced_usage.rst index 61277e77..088d9045 100644 --- a/docs/source/about/advanced_usage.rst +++ b/docs/source/about/advanced_usage.rst @@ -156,14 +156,12 @@ back_button_timeout ^^^^^^^^^^^^^^^^^^^ **Description** - If, after the timeout, the back/select button is still pressed down, Home/Guide button press is emulated. - - On Nvidia Shield, the home and power button are not passed to Moonlight. + If the Back/Select button is held down for the specified number of milliseconds, a Home/Guide button press is emulated. .. Tip:: If back_button_timeout < 0, then the Home/Guide button will not be emulated. **Default** - ``2000`` + ``-1`` **Example** .. code-block:: text diff --git a/src/config.cpp b/src/config.cpp index 585bbc37..6e4c93e3 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -429,7 +429,7 @@ namespace config { { 0x11, 0xA2 }, { 0x12, 0xA4 }, }, - 2s, // back_button_timeout + -1ms, // back_button_timeout 500ms, // key_repeat_delay std::chrono::duration { 1 / 24.9 }, // key_repeat_period diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index 9878802d..4433d463 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -334,23 +334,21 @@
- +
Home/Guide Button Emulation Timeout
- The back/select button on the controller.
- On the Shield, the home and power button are not passed to Moonlight.
- If, after the timeout, the back button is still pressed down, Home/Guide button press is emulated.
- If back_button_timeout < 0, then the Home/Guide button will not be emulated
+ If the Back/Select button is held down for the specified number of milliseconds, a Home/Guide button press is emulated.
+ If set to a value < 0 (default), holding the Back/Select button will not emulate the Home/Guide button.