From 3068aa8a0674efff2c32d75be55476548e156f81 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:40:36 +0700 Subject: [PATCH] Minor fix for touch control --- better-xcloud.user.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/better-xcloud.user.js b/better-xcloud.user.js index 1ccd35a..4978300 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -3657,8 +3657,14 @@ class TouchController { } // Dispatch a message to display generic touch controller - if (focused && msg.data.includes('touchcontrols/showtitledefault')) { - TouchController.#enable && TouchController.getCustomLayouts(GAME_XBOX_TITLE_ID); + if (msg.data.includes('touchcontrols/showtitledefault')) { + if (TouchController.#enable) { + if (focused) { + TouchController.getCustomLayouts(GAME_XBOX_TITLE_ID); + } else { + TouchController.#showDefault(); + } + } return; }