From 788ac3d527e55c6c99c44acd6f4d03256d2d7cc0 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Thu, 7 Mar 2024 09:12:30 +0700 Subject: [PATCH] Add "disableTakRenderer" patch --- better-xcloud.user.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/better-xcloud.user.js b/better-xcloud.user.js index b98ebdb..17f7cf9 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -7701,6 +7701,16 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) { funcStr = funcStr.replace(text, text + newCode); return funcStr; }, + + disableTakRenderer: function(funcStr) { + const text = 'const{TakRenderer:'; + if (!funcStr.includes(text)) { + return false; + } + + funcStr = funcStr.replace(text, 'return;' + text); + return funcStr; + }, }; static #PATCH_ORDERS = [ @@ -7745,6 +7755,7 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) { ['playVibration'], getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'all' && ['exposeTouchLayoutManager'], + getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'off' && ['disableTakRenderer'], ENABLE_XCLOUD_LOGGER && ['enableConsoleLogging'],