科技媒体 windows latest 今天(7 月 16 日)发布博文,报道称微软计划为 windows 11 系统引入新特性,在检测到掌机设备启动后,首次装机体验(oobe)自动切换到新的用户界面。
消息源称在 windows 11 系统的 oobe 中,在检测到是由游戏掌机设备启动,系统将自动切换到一个专为掌机游戏优化的新用户界面。
微软在 windows 11 build 26200 预览版中,在 initializegamepadlegend () 函数的顶部嵌入相关代码,构造函数设置完成后,会运行以下代码:
let shouldshowgamepadlegend = this.showlightfooter && cloudexperiencehost.environment.isgamepadbaseddevice()
cloudexperiencehost.environment.isgamepadbaseddevice () 函数会询问硬件抽象层,设备是否具有集成的游戏手柄控制。
如果返回 true,本地布尔变量 shouldshowgamepadlegend 就会变为 true,附上相关代码如下:
if (cloudexperiencehost.featurestaging.isoobefeatureenabled("gamepadlegendenabled")) { if (shouldshowgamepadlegend) { this.updategamepadabutton() this.updategamepadbbutton() this.showgamepadlegend(true) navmanager.addeventlistener("showbackbutton" this.onshowgamepadbbutton.bind(this)) navmanager.addeventlistener("hidebackbutton" this.onhidegamepadbbutton.bind(this)) } }
根据上述代码显示的信息,在检测到设备包含 xbox 风格的 a / b / x / y 按钮硬件之后,在 oobe 装机界面中,就会切换到手持友好的界面,后续操作会更改为“按 a 继续”或“按 b 返回”等提示。
发表评论