mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Add "patchStreamHud" patch
This commit is contained in:
parent
ae24005f08
commit
8286429cc3
@ -8249,6 +8249,22 @@ if (gamepadFound) {
|
||||
funcStr = funcStr.replace(text, 'this.useCombinedAudioVideoStream=true');
|
||||
return funcStr;
|
||||
},
|
||||
|
||||
patchStreamHud: function(funcStr) {
|
||||
const text = 'let{onCollapse';
|
||||
if (!funcStr.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Restore the "..." button
|
||||
funcStr = funcStr.replace(text, 'e.guideUI = null;' + text);
|
||||
|
||||
// Remove the TAK Edit button when the touch controller is disabled
|
||||
if (getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'off') {
|
||||
funcStr = funcStr.replace(text, 'e.canShowTakHUD = false;' + text);
|
||||
}
|
||||
return funcStr;
|
||||
},
|
||||
};
|
||||
|
||||
static #PATCH_ORDERS = [
|
||||
@ -8291,6 +8307,8 @@ if (gamepadFound) {
|
||||
getPref(Preferences.REMOTE_PLAY_ENABLED) && ['remotePlayConnectMode'],
|
||||
getPref(Preferences.REMOTE_PLAY_ENABLED) && ['remotePlayGuideWorkaround'],
|
||||
|
||||
['patchStreamHud'],
|
||||
|
||||
['playVibration'],
|
||||
HAS_TOUCH_SUPPORT && getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'all' && ['exposeTouchLayoutManager'],
|
||||
HAS_TOUCH_SUPPORT && (getPref(Preferences.STREAM_TOUCH_CONTROLLER) === 'off' || getPref(Preferences.STREAM_TOUCH_CONTROLLER_AUTO_OFF)) && ['disableTakRenderer'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user