mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-05 20:58:27 +02:00
Add "alwaysShowStreamHud" patch
This commit is contained in:
9
dist/better-xcloud.user.js
vendored
9
dist/better-xcloud.user.js
vendored
@@ -5839,6 +5839,14 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
return str2 = str2.replace("}getSetting(e){", "}getSetting(e){" + newCode), str2;
|
return str2 = str2.replace("}getSetting(e){", "}getSetting(e){" + newCode), str2;
|
||||||
|
},
|
||||||
|
alwaysShowStreamHud(str2) {
|
||||||
|
let index = str2.indexOf(",{onShowStreamMenu:");
|
||||||
|
if (index === -1)
|
||||||
|
return !1;
|
||||||
|
if (index = str2.indexOf("&&(0,", index - 100), index === -1)
|
||||||
|
return !1;
|
||||||
|
return str2 = str2.substring(0, index) + "|| true" + str2.substring(index), str2;
|
||||||
}
|
}
|
||||||
}, PATCH_ORDERS = [
|
}, PATCH_ORDERS = [
|
||||||
...getPref(PrefKey.NATIVE_MKB_ENABLED) === "on" ? [
|
...getPref(PrefKey.NATIVE_MKB_ENABLED) === "on" ? [
|
||||||
@@ -5883,6 +5891,7 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
|||||||
"disableGamepadDisconnectedScreen",
|
"disableGamepadDisconnectedScreen",
|
||||||
"patchStreamHud",
|
"patchStreamHud",
|
||||||
"playVibration",
|
"playVibration",
|
||||||
|
"alwaysShowStreamHud",
|
||||||
getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && !getPref(PrefKey.STREAM_COMBINE_SOURCES) && "patchAudioMediaStream",
|
getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && !getPref(PrefKey.STREAM_COMBINE_SOURCES) && "patchAudioMediaStream",
|
||||||
getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && getPref(PrefKey.STREAM_COMBINE_SOURCES) && "patchCombinedAudioVideoMediaStream",
|
getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && getPref(PrefKey.STREAM_COMBINE_SOURCES) && "patchCombinedAudioVideoMediaStream",
|
||||||
getPref(PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG) && "skipFeedbackDialog",
|
getPref(PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG) && "skipFeedbackDialog",
|
||||||
|
@@ -757,7 +757,22 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
|||||||
`;
|
`;
|
||||||
str = str.replace(text, text + newCode);
|
str = str.replace(text, text + newCode);
|
||||||
return str;
|
return str;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
alwaysShowStreamHud(str: string) {
|
||||||
|
let index = str.indexOf(',{onShowStreamMenu:');
|
||||||
|
if (index === -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
index = str.indexOf('&&(0,', index - 100);
|
||||||
|
if (index === -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
str = str.substring(0, index) + '|| true' + str.substring(index);
|
||||||
|
return str;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let PATCH_ORDERS: PatchArray = [
|
let PATCH_ORDERS: PatchArray = [
|
||||||
@@ -819,6 +834,8 @@ let PLAYING_PATCH_ORDERS: PatchArray = [
|
|||||||
'patchStreamHud',
|
'patchStreamHud',
|
||||||
'playVibration',
|
'playVibration',
|
||||||
|
|
||||||
|
'alwaysShowStreamHud',
|
||||||
|
|
||||||
// 'exposeEventTarget',
|
// 'exposeEventTarget',
|
||||||
|
|
||||||
// Patch volume control for normal stream
|
// Patch volume control for normal stream
|
||||||
|
Reference in New Issue
Block a user