mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-05 20:58:27 +02:00

commit 2faed50e5c2165647e389d794de673038d56241e Author: redphx <96280+redphx@users.noreply.github.com> Date: Fri May 24 18:09:25 2024 +0700 Make shortcuts work with controller commit b8f6c503ba7969de3a232644d3f6b53532a4b7bb Author: redphx <96280+redphx@users.noreply.github.com> Date: Fri May 24 17:01:15 2024 +0700 Update translations commit 6f6c0899e5a09cd5534e06a9e272bf78c74536dc Author: redphx <96280+redphx@users.noreply.github.com> Date: Fri May 24 17:00:50 2024 +0700 Preload PrompFont commit 1bf0f2b9dae77890d35091bed970b942c4d61fbc Author: redphx <96280+redphx@users.noreply.github.com> Date: Fri May 24 07:08:05 2024 +0700 Render Controller shortcuts settings commit 2f24965c73a941be2ebc8a3509dc540a47b4e38d Author: redphx <96280+redphx@users.noreply.github.com> Date: Thu May 23 17:21:55 2024 +0700 Fix not able to capture screenshot after switching games commit 6ac791e2dfb17215ee82d449047d0cd11d185c42 Author: redphx <96280+redphx@users.noreply.github.com> Date: Thu May 23 17:11:19 2024 +0700 Hijack the Home button
77 lines
1.8 KiB
TypeScript
77 lines
1.8 KiB
TypeScript
// Get type of an array's element
|
|
type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
|
|
type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>
|
|
|
|
interface Window {
|
|
AppInterface: any;
|
|
BX_FLAGS?: BxFlags;
|
|
BX_CE: (elmName: string, props: {[index: string]: any}={}) => HTMLElement;
|
|
BX_EXPOSED: any;
|
|
|
|
BX_VIBRATION_INTENSITY: number;
|
|
BX_ENABLE_CONTROLLER_VIBRATION: boolean;
|
|
BX_ENABLE_DEVICE_VIBRATION: boolean;
|
|
|
|
BX_REMOTE_PLAY_CONFIG: BxStates.remotePlay.config;
|
|
}
|
|
|
|
interface NavigatorBattery extends Navigator {
|
|
getBattery: () => Promise<{
|
|
charging: boolean,
|
|
level: float,
|
|
}>,
|
|
}
|
|
|
|
type BxStates = {
|
|
isPlaying: boolean;
|
|
appContext: any | null;
|
|
serverRegions: any;
|
|
|
|
hasTouchSupport: boolean;
|
|
browserHasTouchSupport: boolean;
|
|
|
|
currentStream: Partial<{
|
|
titleId: string;
|
|
xboxTitleId: string;
|
|
productId: string;
|
|
titleInfo: XcloudTitleInfo;
|
|
|
|
$video: HTMLVideoElement | null;
|
|
|
|
peerConnection: RTCPeerConnection;
|
|
audioContext: AudioContext | null;
|
|
audioGainNode: GainNode | null;
|
|
}>;
|
|
|
|
remotePlay: Partial<{
|
|
isPlaying: boolean;
|
|
server: string;
|
|
config: {
|
|
serverId: string;
|
|
};
|
|
}>;
|
|
}
|
|
|
|
type DualEnum = {[index: string]: number} & {[index: number]: string};
|
|
|
|
type XcloudTitleInfo = {
|
|
details: {
|
|
productId: string;
|
|
supportedInputTypes: InputType[];
|
|
hasTouchSupport: boolean;
|
|
hasFakeTouchSupport: boolean;
|
|
hasMkbSupport: boolean;
|
|
};
|
|
|
|
product: {
|
|
heroImageUrl: string;
|
|
titledHeroImageUrl: string;
|
|
tileImageUrl: string;
|
|
};
|
|
};
|
|
|
|
declare module '*.js';
|
|
declare module '*.svg';
|
|
declare module '*.styl';
|