Fix custom touch control not working in Remote Play (#674)

This commit is contained in:
redphx 2025-02-21 07:10:54 +07:00
parent 3b2abbf6bb
commit 0b02a758db
4 changed files with 6 additions and 6 deletions

View File

@ -4981,7 +4981,7 @@ class TouchController {
}
if (!layoutId) layoutId = TouchController.#customLayouts[xboxTitleId]?.default_layout || null;
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;
}
let layoutChanged = TouchController.#currentLayoutId !== layoutId;
@ -8573,7 +8573,7 @@ class XhomeInterceptor {
if (hasTouchSupport) TouchController.disable(), BxEvent.dispatch(window, BxEvent.CUSTOM_TOUCH_LAYOUTS_LOADED, {
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;
}
static async handleTitles(request) {

File diff suppressed because one or more lines are too long

View File

@ -209,7 +209,7 @@ export class TouchController {
}
if (!layoutId) {
BxLogger.error(LOG_TAG, 'Invalid layoutId, show default controller');
BxLogger.warning(LOG_TAG, 'Invalid layoutId, show default controller');
TouchController.#enabled && TouchController.#showDefault();
return;
}

View File

@ -95,7 +95,7 @@ export class XhomeInterceptor {
});
} else {
TouchController.enable();
TouchController.requestCustomLayouts(xboxTitleId);
TouchController.requestCustomLayouts();
}
response.json = () => Promise.resolve(obj);