[Good First Issue] Implement XSystemHandleTrack and XSystemIsHandleValid handle registry in xgameruntime #22

Closed
opened 2026-11-26 19:10:55 +00:00 by github-bot · 0 comments
Owner

@⁠californiaAlmonds on GitHub · 2026-11-22 08:35 UTC · original

Summary

Real GDK / GDKX titles and middleware use XSystemHandleTrack and XSystemIsHandleValid to track GDK runtime handles and detect invalid/stale handle usage. Implementing a real thread-safe handle registry in xgameruntime closes a clean, self-contained GDK compatibility gap.

Scope

  • Add a thread-safe handle tracking registry in xgameruntime (src/shims/).
  • Export and implement:
    • XSystemHandleTrack (register handle + callback/type tracking)
    • XSystemIsHandleValid (validate tracked handles and properly reject null, unknown, or closed handles)
  • Wire relevant GDK handle creation/close paths (e.g., XTaskQueueHandle, XUserHandle, XStoreContextHandle, etc.) into the tracker where appropriate.
  • Add unit tests covering tracking, valid handle lookup, closed/invalid handle rejection, and concurrent access from multiple threads.

Acceptance Criteria

  • Both symbols exported cleanly from xgameruntime.dll and declared in headers.
  • Unit tests pass in ctest --output-on-failure with 0 warnings.

Ideal first contribution to OpenScarlett! Claim it in a comment or chat with us on Discord: https://discord.gg/sShMY2fjR

**@⁠californiaAlmonds** on GitHub · 2026-11-22 08:35 UTC · [original](https://github.com/californiaAlmonds/OpenScarlett/issues/22) ## Summary Real GDK / GDKX titles and middleware use `XSystemHandleTrack` and `XSystemIsHandleValid` to track GDK runtime handles and detect invalid/stale handle usage. Implementing a real thread-safe handle registry in `xgameruntime` closes a clean, self-contained GDK compatibility gap. ## Scope - Add a thread-safe handle tracking registry in `xgameruntime` (`src/shims/`). - Export and implement: - `XSystemHandleTrack` (register handle + callback/type tracking) - `XSystemIsHandleValid` (validate tracked handles and properly reject null, unknown, or closed handles) - Wire relevant GDK handle creation/close paths (e.g., `XTaskQueueHandle`, `XUserHandle`, `XStoreContextHandle`, etc.) into the tracker where appropriate. - Add unit tests covering tracking, valid handle lookup, closed/invalid handle rejection, and concurrent access from multiple threads. ## Acceptance Criteria - Both symbols exported cleanly from `xgameruntime.dll` and declared in headers. - Unit tests pass in `ctest --output-on-failure` with 0 warnings. --- Ideal first contribution to OpenScarlett! Claim it in a comment or chat with us on Discord: https://discord.gg/sShMY2fjR
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:10:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.