mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +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`;
|
url += `${xboxTitleId}.json`;
|
||||||
}
|
}
|
||||||
NATIVE_FETCH(url)
|
NATIVE_FETCH(url)
|
||||||
.then(resp => resp.json(), () => {
|
.then(resp => resp.json())
|
||||||
TouchController.#customLayouts[xboxTitleId] = null;
|
|
||||||
// Wait for BX_EXPOSED.touch_layout_manager
|
|
||||||
setTimeout(() => dispatchLayouts(null), 1000);
|
|
||||||
})
|
|
||||||
.then(json => {
|
.then(json => {
|
||||||
// Normalize data
|
// Normalize data
|
||||||
const schema_version = json.schema_version || 1;
|
const schema_version = json.schema_version || 1;
|
||||||
@ -3515,6 +3511,11 @@ class TouchController {
|
|||||||
|
|
||||||
// Wait for BX_EXPOSED.touch_layout_manager
|
// Wait for BX_EXPOSED.touch_layout_manager
|
||||||
setTimeout(() => dispatchLayouts(json), 1000);
|
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