Skip to content

Conversation

@MistEO
Copy link
Member

@MistEO MistEO commented Jan 8, 2026

Summary by Sourcery

在各控制单元和绑定中新增连接健康监控机制,并提供统一的 connected 状态接口。

新功能:

  • 引入持久化的 ADB 监控进程和 is_alive API,以极低开销检测设备断连。
  • 为 C++、Python 和 NodeJS 绑定中的自定义控制器暴露 connected 回调/接口;在未实现时提供合理的默认行为。

增强改进:

  • 使用 adb get-state 提升 ADB 连接测试效果,并通过具备连接感知的重试和退避延迟,使 screencap 更加稳健。
  • 在 Win32、PlayCover、调试回放以及轮播图图像控制单元中加入运行时连接校验,跟踪连接状态和窗口有效性。
  • 统一控制器回调和客户端指针相关的日志记录与空指针检查,避免误用并使行为更清晰。
Original summary in English

Summary by Sourcery

Add connection health monitoring and a unified connected status interface across control units and bindings.

New Features:

  • Introduce a persistent ADB monitor process and is_alive API to detect device disconnection with minimal overhead.
  • Expose a connected callback/interface for custom controllers across C++, Python, and NodeJS bindings, with sensible defaults when not implemented.

Enhancements:

  • Improve ADB connection testing using adb get-state and make screencap more robust with connection-aware retries and backoff delays.
  • Add runtime connection validation in Win32, PlayCover, debug replay, and carousel image control units, tracking connection state and window validity.
  • Standardize logging and null checks around controller callbacks and client pointers to avoid misuse and clarify behavior.

@MistEO MistEO added the enhancement New feature or request label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants