Show gyroscope settings if the custom layout supports it

This commit is contained in:
redphx
2024-05-12 12:26:34 +07:00
parent be897848fe
commit 41effff226
3 changed files with 18 additions and 1 deletions

View File

@@ -176,6 +176,9 @@ export class TouchController {
layoutChanged && Toast.show(msg, layout.name, {html: html});
window.setTimeout(() => {
// Show gyroscope control in the "More options" dialog if this layout has gyroscope
window.BX_EXPOSED.shouldShowSensorControls = JSON.stringify(layout).includes('gyroscope');
window.BX_EXPOSED.touchLayoutManager.changeLayoutForScope({
type: 'showLayout',
scope: xboxTitleId,