diff --git a/better-xcloud.user.js b/better-xcloud.user.js index 11d3f3a..3570ade 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -370,6 +370,7 @@ class Preferences { static get USE_DESKTOP_CODEC() { return 'use_desktop_codec'; } static get USER_AGENT_PROFILE() { return 'user_agent_profile'; } static get USER_AGENT_CUSTOM() { return 'user_agent_custom'; } + static get STREAM_HIDE_TOUCH_CONTROLLER() { return 'stream_hide_touch_controller'; } static get SCREENSHOT_BUTTON_POSITION() { return 'screenshot_button_position'; } static get BLOCK_TRACKING() { return 'block_tracking'; } @@ -477,6 +478,10 @@ class Preferences { 'label': 'Hide Dots icon while playing', 'default': false, }, + [Preferences.STREAM_HIDE_TOUCH_CONTROLLER]: { + 'label': 'Disable touch controller', + 'default': false, + }, [Preferences.HIDE_IDLE_CURSOR]: { 'label': 'Hide mouse cursor while playing', 'default': false, @@ -1184,6 +1189,15 @@ div[class*=StreamHUD-module__buttonsContainer] { `; } + // Hide touch controller + if (PREFS.get(Preferences.STREAM_HIDE_TOUCH_CONTROLLER)) { + css += ` +#MultiTouchSurface, #BabylonCanvasContainer-main { + display: none !important; +} +`; + } + const $style = createElement('style', {}, css); document.documentElement.appendChild($style); }