mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix default touch control not showing sometimes
This commit is contained in:
parent
d578718958
commit
aaa7612293
@ -3489,11 +3489,7 @@ class TouchController {
|
||||
url += `${xboxTitleId}.json`;
|
||||
}
|
||||
NATIVE_FETCH(url)
|
||||
.then(resp => resp.json(), () => {
|
||||
TouchController.#customLayouts[xboxTitleId] = null;
|
||||
// Wait for BX_EXPOSED.touch_layout_manager
|
||||
setTimeout(() => dispatchLayouts(null), 1000);
|
||||
})
|
||||
.then(resp => resp.json())
|
||||
.then(json => {
|
||||
// Normalize data
|
||||
const schema_version = json.schema_version || 1;
|
||||
@ -3515,6 +3511,11 @@ class TouchController {
|
||||
|
||||
// Wait for BX_EXPOSED.touch_layout_manager
|
||||
setTimeout(() => dispatchLayouts(json), 1000);
|
||||
})
|
||||
.catch(() => {
|
||||
TouchController.#customLayouts[xboxTitleId] = null;
|
||||
// Wait for BX_EXPOSED.touch_layout_manager
|
||||
setTimeout(() => dispatchLayouts(null), 1000);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user