mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 15:47:18 +02:00
Fix overriding features not working
This commit is contained in:
parent
597cc9782d
commit
11aefb34d1
@ -244,24 +244,6 @@ logFunc(logTag, '//', logMessage);
|
|||||||
return str;
|
return str;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Override website's settings
|
|
||||||
overrideSettings(str: string) {
|
|
||||||
const index = str.indexOf(',EnableStreamGate:');
|
|
||||||
if (index < 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the next "},"
|
|
||||||
const endIndex = str.indexOf('},', index);
|
|
||||||
|
|
||||||
let newSettings = JSON.stringify(FeatureGates);
|
|
||||||
newSettings = newSettings.substring(1, newSettings.length - 1);
|
|
||||||
|
|
||||||
const newCode = ',' + newSettings;
|
|
||||||
str = PatcherUtils.insertAt(str, endIndex, newCode);
|
|
||||||
return str;
|
|
||||||
},
|
|
||||||
|
|
||||||
disableGamepadDisconnectedScreen(str: string) {
|
disableGamepadDisconnectedScreen(str: string) {
|
||||||
const index = str.indexOf('"GamepadDisconnected_Title",');
|
const index = str.indexOf('"GamepadDisconnected_Title",');
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
@ -972,7 +954,6 @@ let PATCH_ORDERS = PatcherUtils.filterPatches([
|
|||||||
'patchRequestInfoCrash',
|
'patchRequestInfoCrash',
|
||||||
|
|
||||||
'disableStreamGate',
|
'disableStreamGate',
|
||||||
'overrideSettings',
|
|
||||||
'broadcastPollingMode',
|
'broadcastPollingMode',
|
||||||
'patchGamepadPolling',
|
'patchGamepadPolling',
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ import { TouchController } from "@/modules/touch-controller";
|
|||||||
import { NativeMkbMode, TouchControllerMode } from "@/enums/pref-values";
|
import { NativeMkbMode, TouchControllerMode } from "@/enums/pref-values";
|
||||||
import { Patcher, type PatchPage } from "@/modules/patcher/patcher";
|
import { Patcher, type PatchPage } from "@/modules/patcher/patcher";
|
||||||
import { BxEventBus } from "./bx-event-bus";
|
import { BxEventBus } from "./bx-event-bus";
|
||||||
|
import { FeatureGates } from "./feature-gates";
|
||||||
|
|
||||||
export enum SupportedInputType {
|
export enum SupportedInputType {
|
||||||
CONTROLLER = 'Controller',
|
CONTROLLER = 'Controller',
|
||||||
@ -36,6 +37,15 @@ export const BxExposed = {
|
|||||||
BxLogger.error(LOG_TAG, e);
|
BxLogger.error(LOG_TAG, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Override feature gates
|
||||||
|
try {
|
||||||
|
for (const exp in FeatureGates) {
|
||||||
|
state.experiments.overrideFeatureGates[exp.toLocaleLowerCase()] = FeatureGates[exp];
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
BxLogger.error(LOG_TAG, e);
|
||||||
|
}
|
||||||
|
|
||||||
// Add list of games with custom layouts to the official list
|
// Add list of games with custom layouts to the official list
|
||||||
try {
|
try {
|
||||||
const sigls = state.xcloud.sigls;
|
const sigls = state.xcloud.sigls;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user