Repository navigation
OpenDS 0.3.1
中文 | English
这一版主要处理"连不上时说不清原因"和"检查依赖时界面卡住"两件事:新增连接诊断与自动恢复,把驱动查询移出窗口消息循环,并按 Windows 快捷方式语义重做了快捷方式创建。
新增
连接诊断
- 断线不再只有一句"连接失败"。桥接状态栏区分「蓝牙连接中断 · 等待重新连接」「初始化失败 · 等待重试」「已重新连接 · 正在确认连接稳定」「已停止 · 请查看断线原因」,并提供「查看断线原因」查看完整说明。
- 诊断按场景给出可执行建议,并明确区分「已经能确定」与「只是可能」:
- 读取真实手柄特性时 Windows 返回 170(请求的资源正在使用),随后建链失败 —— 提示其他程序可能同时占用物理手柄或改变了协议状态,但无法确定是哪个进程。
- 桥接建立后毫秒级断开 —— 列出其他程序访问、蓝牙链路或供电、输出冲突等可能原因,不臆断具体成因。
- 持续运行若干秒后中断 —— 建议检查电量、信号和其他手柄工具。
- 初始化失败 —— 指向蓝牙连接、驱动诊断和 HidHide 权限。
- 建链前先做输入探活:蓝牙设备能打开但收不到有效按键输入时,不隐藏物理手柄、也不创建虚拟设备,避免一次没有意义的设备插拔(Steam 等程序会对这类插拔重放整套识别流程)。
- 连续建链失败按指数退避重试,界面显示下次重试时间,并在提示中指向 Steam 的桌面布局与指南键组合设置 —— 后者会把 PS 键组合映射成 Windows 无障碍快捷键。
快捷方式
- 设置界面可直接创建桌面或开始菜单快捷方式。
- 目标位置已有文件时不覆盖,并按 Windows 文件标识(而非路径字符串)比较,避免同一程序因路径写法不同被重复创建。
- 安装脚本
Install-OpenDS.ps1默认不再创建开始菜单快捷方式;需要时显式传-StartMenuShortcut,与-NoShortcut互斥。
改进
- 驱动与设备查询移到独立工作线程(
opends-diagnostics),消息循环只做轮询。打开「诊断与日志」或点「重新检查」时界面不再停顿。 - 退出路径统一到一套共享清理预算(3.5 秒):系统注销或关机时进入同一流程,不再触发待执行的语言重启,也不再弹出错误对话框。
- 关闭确认对话框改用与其他窗口一致的主题化对话框,深浅色切换时不再出现系统原生的白色弹窗。
测试与内部
- 新增
Test-Responsiveness.ps1(原生输入后台行为、页面切换延迟)和Test-Shutdown.ps1(退出取消、模态窗口、CSV 刷写、卡死的工作线程),并接入 CI。 - 新增安装脚本测试,验证快捷方式必须显式授权才会创建。
升级说明
opends.ini 无结构变化。若你依赖安装脚本自动创建开始菜单项,请改传 -StartMenuShortcut,或安装后在设置界面点一次「创建开始菜单快捷方式」。
English
This release is about two things: being explicit when a connection fails, and never freezing the window while dependencies are checked. Connection diagnostics, automatic recovery and Windows-correct shortcut creation are new.
Added
Connection diagnostics
- A dropped link is no longer reported as a bare failure. The bridge status bar distinguishes "Bluetooth connection interrupted, waiting to reconnect", "initialisation failed, waiting to retry", "reconnected, confirming stability" and "stopped, see the disconnection reason", with a "View disconnection reason" action that shows the full explanation.
- Diagnostics give actionable advice per scenario and separate what is certain from what is merely possible:
- Windows returns 170 (the requested resource is in use) while reading physical controller features, and the link then fails — other software may be accessing the controller or altering its protocol state, but which process cannot be determined.
- The link drops milliseconds after connecting — other software access, Bluetooth link or power problems, and output conflicts are listed as possibilities, without asserting a cause.
- The link drops after running for a while — check battery, signal and other controller tools.
- Initialisation fails — points at the Bluetooth link, driver diagnostics and HidHide permissions.
- An input probe now runs before bridging: if the Bluetooth device opens but delivers no valid button input, the physical controller is not hidden and no virtual device is created, avoiding a pointless device cycle that makes Steam and similar software re-run its whole detection sequence.
- Consecutive bridge failures retry with exponential backoff, the UI shows the next retry time, and the message points at Steam's desktop layout and guide-chord settings, which map PS button combinations onto Windows accessibility shortcuts.
Shortcuts
- Desktop and Start menu shortcuts can be created from the settings window.
- Existing files are never overwritten, and targets are compared by Windows file identity rather than path strings, so the same program is not duplicated because of a different path spelling.
Install-OpenDS.ps1no longer creates a Start menu shortcut by default; pass-StartMenuShortcutexplicitly. It is mutually exclusive with-NoShortcut.
Improved
- Driver and device queries moved to a worker thread (
opends-diagnostics) and are polled from the message loop. Opening Diagnostics or pressing "Check again" no longer stalls the window. - Shutdown paths share one cleanup budget (3.5 s): Windows logoff and shutdown enter the same flow, no longer trigger a pending language restart, and no longer show an error dialog.
- The close-confirmation dialog now uses the same themed dialog as every other window instead of a raw system dialog.
Tests and internals
- Added
Test-Responsiveness.ps1(native input background behaviour, page-switch latency) andTest-Shutdown.ps1(exit cancellation, modal windows, CSV flush, stalled workers), both wired into CI. - Added installer tests asserting that shortcuts are only created with explicit consent.
Upgrading
No opends.ini changes. If you relied on the installer creating a Start menu entry, pass -StartMenuShortcut, or click "Create Start menu shortcut" in the settings window after installing.
完整变更 / Full changelog: v0.3.0...v0.3.1