mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:40:52 +01:00
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#2397
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/2395
Author: @aslan2142
Created: 11/26/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142
Base:
main← Head:integration/tls-exit-and-scripted-input📝 Commits (7)
338dc11runtime: own the executable TLS exit callback4e93ea9gameinput: advance scripted input clock without SDL3ee47019Improve first-run input diagnostics8a600e1Merge #2315 (ZroIsHere): runtime: own the executable TLS exit callback95d1811Merge #2372 (ZroIsHere): advance scripted input and improve boot diagnostics48f87a9process: call the EXE's thread-local destructor callback with its real signature, before the atexit handlers (maintainer fix on #2315)657808agameinput (no SDL3): take the script's changes between two reads at their own time instead of a clock thread (maintainer fix on #2372)📊 Changes
9 files changed (+205 additions, -39 deletions)
View changed files
📝
docs/gameinput.md(+9 -4)📝
runtime/README.md(+9 -3)📝
runtime/shims/gameinput.cpp(+10 -5)📝
runtime/shims/gameinput_no_sdl.cpp(+88 -8)📝
runtime/shims/process.cpp(+32 -3)📝
runtime/test/check_atexit.cmake(+8 -2)📝
runtime/test/fixtures/tiny_atexit.cpp(+13 -0)📝
runtime/test/gameinput_no_sdl_test.cpp(+30 -13)📝
scripts/windows-boot/boot.ps1(+6 -1)📄 Description
This merges two of ZroIsHere's draft runtime PRs, each with a maintainer fix on top and a new test.
Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7200103121 (item
INTEGRATION-ZRO-DRAFTS)Included
_register_thread_local_exe_atexit_callback). The host UCRT accepts one callback per process and fast-fails on the second one. gta6rt's own startup registers the first, so on Windows the title stopped at boot. Under Wine, the title's callback replaced gta6rt's own and was never called. This removes the cause.LEONIDA_INPUT_TRACE(a reading trace), anAcount inLEONIDA_INPUT_STATS, and-FirstRunUiinscripts/windows-boot/boot.ps1.Maintainer changes
On #2315:
_tls_callback_type(void (__stdcall*)(void*, unsigned long, void*)in UCRTprocess.h), as(nullptr, DLL_PROCESS_DETACH, nullptr). The PR called it asvoid (*)(), so the reason argument was whateverrdxheld.exitand_cexitcall it once, before the atexit handlers, as the UCRT does. The leaving thread'sthread_localobjects end before the static ones. The PR ran it after the static destructors, and not in_cexit.run_tiny_atexitgainsthread_local_exitandthread_local_cexit.On #2372:
update()now adds one reading for every start and end of a press since the last update, stamped with the script's time. The history is the same however often the title reads, and no thread runs. This removes the cause; the thread worked around it.LEONIDA_INPUT_TRACEis documented indocs/gameinput.mdandruntime/README.md.gameinput_no_sdl_scriptgainsy@10, a press the title never reads while it is down.Left out
Nothing.
Tests
On Linux, Mesa 26.3.1 RADV, Ryzen 9 7950X3D integrated GPU (gfx1036):
mainbdbc7e923and pass on this branch:run_tiny_atexit(onmain, thethread_localdestructor never runs under--run) andgameinput_no_sdl_script(4 history checks fail onmain).mainbdbc7e923is 421 pass, 24 fail. No test went from pass to fail. The one change isxmem_no_write_watch, from fail to pass, a known flake.tests/test_ci_registration.py, alltests/test_docs_*.py,tests/test_text_write_line_endings.py,scripts/check_no_game_data.pyon the changed files andgit diff --checkall pass.Not tested
--run(a game run follows from this build).boot.ps1 -FirstRunUi.AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.