Use a better method to enable touch control for all games

This commit is contained in:
redphx
2024-04-29 10:05:22 +07:00
parent 102a4657f0
commit cd6dd1e22d
9 changed files with 104 additions and 128 deletions

15
src/types/index.d.ts vendored
View File

@@ -31,6 +31,7 @@ type BxStates = {
titleId: string;
xboxTitleId: string;
productId: string;
titleInfo: XcloudTitleInfo;
$video: HTMLVideoElement | null;
$screenshotCanvas: HTMLCanvasElement | null;
@@ -50,3 +51,17 @@ type BxStates = {
}
type DualEnum = {[index: string]: number} & {[index: number]: string};
type XcloudTitleInfo = {
details: {
productId: string;
supportedInputTypes: InputType[];
hasTouchSupport: boolean;
};
product: {
heroImageUrl: string;
titledHeroImageUrl: string;
tileImageUrl: string;
};
};