mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 16:17:20 +02:00
Use a different method to disable StreamGate (#210)
This commit is contained in:
parent
6c996769b7
commit
00041eb911
@ -6570,7 +6570,7 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
|||||||
const endIndex = funcStr.indexOf('},', index);
|
const endIndex = funcStr.indexOf('},', index);
|
||||||
|
|
||||||
const newSettings = [
|
const newSettings = [
|
||||||
'EnableStreamGate: false',
|
// 'EnableStreamGate: false',
|
||||||
'PwaPrompt: false',
|
'PwaPrompt: false',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -6651,9 +6651,24 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
|||||||
|
|
||||||
return funcStr;
|
return funcStr;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Disable StreamGate
|
||||||
|
disableStreamGate: function(funcStr) {
|
||||||
|
const index = funcStr.indexOf('case"partially-ready":');
|
||||||
|
if (index === -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const bracketIndex = funcStr.indexOf('=>{', index - 150) + 3;
|
||||||
|
|
||||||
|
funcStr = funcStr.substring(0, bracketIndex) + 'return 0;' + funcStr.substring(bracketIndex);
|
||||||
|
return funcStr;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static #PATCH_ORDERS = [
|
static #PATCH_ORDERS = [
|
||||||
|
['disableStreamGate'],
|
||||||
|
|
||||||
[
|
[
|
||||||
'disableAiTrack',
|
'disableAiTrack',
|
||||||
'disableTelemetry',
|
'disableTelemetry',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user