Fix touch controller not working on non-touch supported games

This commit is contained in:
redphx 2024-04-29 15:29:58 +07:00
parent f615471120
commit 6421243d68
3 changed files with 3 additions and 1 deletions

View File

@ -325,7 +325,7 @@ if (match) {
const newCode = `
const titleInfo = window.BX_EXPOSED.getTitleInfo();
if (!titleInfo.details.hasTouchSupport) {
if (!titleInfo.details.hasTouchSupport && !titleInfo.details.hasFakeTouchSupport) {
return;
}
`;

View File

@ -57,6 +57,7 @@ type XcloudTitleInfo = {
productId: string;
supportedInputTypes: InputType[];
hasTouchSupport: boolean;
hasFakeTouchSupport: boolean;
hasMkbSupport: boolean;
};

View File

@ -79,6 +79,7 @@ export const BxExposed = {
if (!titleInfo.details.hasTouchSupport && touchControllerAvailability === 'all') {
// Add generic touch support for non touch-supported games
titleInfo.details.hasFakeTouchSupport = true;
supportedInputTypes.push(InputType.GENERIC_TOUCH);
}