mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-01 10:56:42 +02:00
Lite: remove XhomeInterceptor and TouchController in built script
This commit is contained in:
@@ -22,7 +22,7 @@ export type SupportedInputTypeValue = (typeof SupportedInputType)[keyof typeof S
|
||||
export const BxExposed = {
|
||||
getTitleInfo: () => STATES.currentStream.titleInfo,
|
||||
|
||||
modifyTitleInfo: (titleInfo: XcloudTitleInfo): XcloudTitleInfo => {
|
||||
modifyTitleInfo: isFullVersion() && function(titleInfo: XcloudTitleInfo): XcloudTitleInfo {
|
||||
// Clone the object since the original is read-only
|
||||
titleInfo = deepClone(titleInfo);
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
import { isFullVersion } from "@macros/build" with {type: "macro"};
|
||||
|
||||
import { BxEvent } from "@utils/bx-event";
|
||||
import { BX_FLAGS, NATIVE_FETCH } from "@utils/bx-flags";
|
||||
import { TouchController } from "@modules/touch-controller";
|
||||
@@ -222,7 +224,7 @@ export function interceptHttpRequests() {
|
||||
for (let i = 1; i < obj.length; i++) {
|
||||
gamepassAllGames.push(obj[i].id);
|
||||
}
|
||||
} else if (url.includes(GamePassCloudGallery.TOUCH)) {
|
||||
} else if (isFullVersion() && url.includes(GamePassCloudGallery.TOUCH)) {
|
||||
try {
|
||||
let customList = TouchController.getCustomList();
|
||||
|
||||
@@ -262,7 +264,7 @@ export function interceptHttpRequests() {
|
||||
requestType = 'xcloud';
|
||||
}
|
||||
|
||||
if (requestType === 'xhome') {
|
||||
if (isFullVersion() && requestType === 'xhome') {
|
||||
return XhomeInterceptor.handle(request as Request);
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
import { isFullVersion } from "@macros/build" with {type: "macro"};
|
||||
|
||||
import { LoadingScreen } from "@modules/loading-screen";
|
||||
import { RemotePlayManager } from "@/modules/remote-play-manager";
|
||||
import { StreamBadges } from "@modules/stream/stream-badges";
|
||||
@@ -147,7 +149,7 @@ class XcloudInterceptor {
|
||||
}
|
||||
|
||||
// Touch controller for all games
|
||||
if (getPref(PrefKey.STREAM_TOUCH_CONTROLLER) === StreamTouchController.ALL) {
|
||||
if (isFullVersion() && getPref(PrefKey.STREAM_TOUCH_CONTROLLER) === StreamTouchController.ALL) {
|
||||
const titleInfo = STATES.currentStream.titleInfo;
|
||||
if (titleInfo?.details.hasTouchSupport) {
|
||||
TouchController.disable();
|
||||
@@ -187,7 +189,7 @@ class XcloudInterceptor {
|
||||
}
|
||||
|
||||
// Enable touch controller
|
||||
if (TouchController.isEnabled()) {
|
||||
if (isFullVersion() && TouchController.isEnabled()) {
|
||||
overrides.inputConfiguration.enableTouchInput = true;
|
||||
overrides.inputConfiguration.maxTouchPoints = 10;
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
import { isFullVersion } from "@macros/build" with {type: "macro"};
|
||||
|
||||
import { TouchController } from "@/modules/touch-controller";
|
||||
import { BxEvent } from "./bx-event";
|
||||
import { SupportedInputType } from "./bx-exposed";
|
||||
|
Reference in New Issue
Block a user