mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix touch controller not working on non-touch supported games
This commit is contained in:
parent
f615471120
commit
6421243d68
@ -325,7 +325,7 @@ if (match) {
|
|||||||
|
|
||||||
const newCode = `
|
const newCode = `
|
||||||
const titleInfo = window.BX_EXPOSED.getTitleInfo();
|
const titleInfo = window.BX_EXPOSED.getTitleInfo();
|
||||||
if (!titleInfo.details.hasTouchSupport) {
|
if (!titleInfo.details.hasTouchSupport && !titleInfo.details.hasFakeTouchSupport) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
1
src/types/index.d.ts
vendored
1
src/types/index.d.ts
vendored
@ -57,6 +57,7 @@ type XcloudTitleInfo = {
|
|||||||
productId: string;
|
productId: string;
|
||||||
supportedInputTypes: InputType[];
|
supportedInputTypes: InputType[];
|
||||||
hasTouchSupport: boolean;
|
hasTouchSupport: boolean;
|
||||||
|
hasFakeTouchSupport: boolean;
|
||||||
hasMkbSupport: boolean;
|
hasMkbSupport: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,6 +79,7 @@ export const BxExposed = {
|
|||||||
|
|
||||||
if (!titleInfo.details.hasTouchSupport && touchControllerAvailability === 'all') {
|
if (!titleInfo.details.hasTouchSupport && touchControllerAvailability === 'all') {
|
||||||
// Add generic touch support for non touch-supported games
|
// Add generic touch support for non touch-supported games
|
||||||
|
titleInfo.details.hasFakeTouchSupport = true;
|
||||||
supportedInputTypes.push(InputType.GENERIC_TOUCH);
|
supportedInputTypes.push(InputType.GENERIC_TOUCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user