mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-03 06:07:19 +02:00
Fix custom touch control not working in Remote Play (#674)
This commit is contained in:
parent
3b2abbf6bb
commit
0b02a758db
4
dist/better-xcloud.pretty.user.js
vendored
4
dist/better-xcloud.pretty.user.js
vendored
@ -4981,7 +4981,7 @@ class TouchController {
|
|||||||
}
|
}
|
||||||
if (!layoutId) layoutId = TouchController.#customLayouts[xboxTitleId]?.default_layout || null;
|
if (!layoutId) layoutId = TouchController.#customLayouts[xboxTitleId]?.default_layout || null;
|
||||||
if (!layoutId) {
|
if (!layoutId) {
|
||||||
BxLogger.error(LOG_TAG, "Invalid layoutId, show default controller"), TouchController.#enabled && TouchController.#showDefault();
|
BxLogger.warning(LOG_TAG, "Invalid layoutId, show default controller"), TouchController.#enabled && TouchController.#showDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let layoutChanged = TouchController.#currentLayoutId !== layoutId;
|
let layoutChanged = TouchController.#currentLayoutId !== layoutId;
|
||||||
@ -8573,7 +8573,7 @@ class XhomeInterceptor {
|
|||||||
if (hasTouchSupport) TouchController.disable(), BxEvent.dispatch(window, BxEvent.CUSTOM_TOUCH_LAYOUTS_LOADED, {
|
if (hasTouchSupport) TouchController.disable(), BxEvent.dispatch(window, BxEvent.CUSTOM_TOUCH_LAYOUTS_LOADED, {
|
||||||
data: null
|
data: null
|
||||||
});
|
});
|
||||||
else TouchController.enable(), TouchController.requestCustomLayouts(xboxTitleId);
|
else TouchController.enable(), TouchController.requestCustomLayouts();
|
||||||
return response.json = () => Promise.resolve(obj), response.text = () => Promise.resolve(JSON.stringify(obj)), response;
|
return response.json = () => Promise.resolve(obj), response.text = () => Promise.resolve(JSON.stringify(obj)), response;
|
||||||
}
|
}
|
||||||
static async handleTitles(request) {
|
static async handleTitles(request) {
|
||||||
|
4
dist/better-xcloud.user.js
vendored
4
dist/better-xcloud.user.js
vendored
File diff suppressed because one or more lines are too long
@ -209,7 +209,7 @@ export class TouchController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!layoutId) {
|
if (!layoutId) {
|
||||||
BxLogger.error(LOG_TAG, 'Invalid layoutId, show default controller');
|
BxLogger.warning(LOG_TAG, 'Invalid layoutId, show default controller');
|
||||||
TouchController.#enabled && TouchController.#showDefault();
|
TouchController.#enabled && TouchController.#showDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ export class XhomeInterceptor {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
TouchController.enable();
|
TouchController.enable();
|
||||||
TouchController.requestCustomLayouts(xboxTitleId);
|
TouchController.requestCustomLayouts();
|
||||||
}
|
}
|
||||||
|
|
||||||
response.json = () => Promise.resolve(obj);
|
response.json = () => Promise.resolve(obj);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user