Fix not showing default touch control

This commit is contained in:
redphx 2024-07-27 16:29:03 +07:00
parent 6a81ee2806
commit 6e17c2e24b
2 changed files with 3 additions and 2 deletions

View File

@ -3289,7 +3289,7 @@ class TouchController {
if (!layoutId)
layoutId = TouchController.#customLayouts[xboxTitleId]?.default_layout || null;
if (!layoutId) {
BxLogger.error(LOG_TAG2, "Invalid layoutId");
BxLogger.error(LOG_TAG2, "Invalid layoutId, show default controller"), TouchController.#enabled && TouchController.#showDefault();
return;
}
const layoutChanged = TouchController.#currentLayoutId !== layoutId;

View File

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