mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #1095] GameInput: resolve the current token for self-stopping callbacks (OLD-9769) #1132
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1132
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1095
Author: @sodove
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:restore/gameinput-current-callback-9769📝 Commits (2)
49f7133gameinput: StopCallback and UnregisterCallback take the current-callback tokena315898Merge remote-tracking branch 'upstream/main' into restore/gameinput-current-callback-9769📊 Changes
3 files changed (+56 additions, -0 deletions)
View changed files
📝
runtime/shims/gameinput.cpp(+16 -0)📝
runtime/shims/gameinput_abi.h(+3 -0)📝
runtime/test/gameinput_test.cpp(+37 -0)📄 Description
Claimed in the coordination issue as: OLD-9769 (claim).
What and why
Carry forward @Joaco9020's GameInput fix from draft #46 (old PR 9769). The rebased commit retains the original authorship and has the same stable patch ID as
84dde3f1c. The branch includes current main75223235d.A reading callback can pass
GAMEINPUT_CURRENT_CALLBACK_TOKEN_VALUEto stop or unregister itself. The shim previously compared that special value directly with the registered tokens, so the callback kept receiving events. The fix resolves it to the callback running on the calling thread and restores the previous token when a nested delivery returns.Tested
Native Windows 11 build 26100.7623, MSVC 19.44, RelWithDebInfo, pinned SDL 3.4.20, synthetic virtual pad.
3aa975421with just the new test and ABI constant: 3 of 371 checks failed, covering self-stop and self-unregister.gta6rtexecutable. In a separate local merge with #1074 at5e86f4a3, the default and long-script tests passed (371/371 and 8/8).git diff --checkand the repository's game-data guard also passed.GPUs tested: n/a (GameInput and SDL virtual devices).
AI-assisted: yes, OpenAI Codex for the rebase and Windows verification. The original commit retains its co-author credit.
Checklist
mainand merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.