Repository navigation
Conversation
…ameInputCreate import The retail executable imports GameInputCreate from GameInput.dll by ordinal 1. The loader looks ordinal imports up as "ItsNotRexed#1", which the shim table did not have, so the import bound to the host's GameInput.dll. On Windows the installed GameInput answers; under Wine it is the builtin stub, the call fails and the title stops on its result. The alias maps ItsNotRexed#1 to the same GameInputCreate, and gameinput_test checks it.
Review: gameinput: serve GameInput.dll's ordinal 1 (#7216)Verdict: approve. This is a two-line fix that is correct and matches how the loader already names ordinal imports. One optional follow-up on the test is below. What changed
Why it is soundThe loader's key matches. In Forwarders also work. The ordinal-to-function mapping is already documented. The D3D12 → Vulkan notes say " The failure it describes is real. Without the alias, the lookup misses the shim. Nothing named Same function, so no ABI or state concerns. The alias points at Notes (none blocking)
Test results (Windows 11, CPython 3.13, no game files)
For reference, the command that runs it: Project rules
AI-assisted. |
|
Independent native Windows check at |
|
Linux/Wine confirmation from our local test setup, with raw logs kept private. Arch Linux, Wine 11.18, clang-cl 23.1.6 + xwin SDK 10.0.26100, RelWithDebInfo, SDL3 enabled; RX 7900 XT / RADV Mesa 26.2.3. Pinned base: main
The negative arm was run by me and the positive arms by a cooperating local tester, with two dedicated Wine prefixes using the same installed Wine. I reviewed the positive run records and matching executable/PDB hashes. Both runners disable networking, keep the original package read-only, and bound startup to 30 seconds. No extra local implementation patches are present in the positive checkpoint. The cooperating tester's Observed next failure: access violation in the device slot-26 forwarder, symbolized with the matching host PDB. Its correspondence to the struct-return ABI issue at boot-chain stop 7 is an inference; the existing device fixes are the next separate integration test. No game bytes, raw traces, addresses or dumps attached. AI-assisted. |
|
Tested
The PR's binding report identifies GameInput ordinal 1 as the additional shim binding. Both runs mapped five modules, exited 0 and had empty stderr. The native virtual-controller test also passed on each revision (341 checks on the parent, 342 on the PR). This verifies import selection with the actual executable. The dry-run does not invoke the game's entry point or exercise physical controller input. GPU/driver not exercised. AI-assisted verification. |
What and why
The retail 1.0.2.1 executable imports
GameInputCreatefromGameInput.dllby ordinal 1, not by name.Loader::resolvelooks an ordinal import up in the shim table asgameinput.dll!#1, which wasn't registered, so the import fell through to the host'sGameInput.dll:fixme:ginput:GameInputCreate ... stub!). The call fails and the title stops on the result with its ownint3, beforeD3D12XboxCreateDevice.The change adds
{"gameinput.dll", "#1", &GameInputCreate}to the existingSHIM_TABLE(built only with SDL3, as before), plus one check ingameinput_testthat#1is the same function.Why ordinal 1 is
GameInputCreate: Wine'sgameinput.spechas it as the first and only export, the executable's call passes a single out-pointer and checks the HRESULT (theGameInputCreate(IGameInput**)shape), and with the alias the title goes on past this point.Tested
Linux, Wine 11.21, clang-cl + xwin cross build,
-DLEONIDA_SDL3_FETCH=ON, GTX 1650 Mobile, own copy of the retail executable (outcomes only):gameinput_testunder Wine: 342 checks, 0 failures (the new check included), on this branch based onmain08c1aa634.gta6rt --runwith Loader: the mapped game executable owns module TLS index 0 (RT-259) #4313, xmem: serve the seven missing imports (physical pages, default allocators, XMemIsToolsMemAvailable); XMemVirtualAlloc takes 2 MiB pages and placeholders #6919, xgameruntime: serve XErrorReport (rebase of #5312) #6582 and runtime: console DirectStorage (DStorageGetFactory) with file-to-memory reads #4348 merged locally (needed to reach this point on Wine), with and without this change:int3afterGameInputCreate; Wine logs its stub being called.D3D12XboxCreateDevicecreates the Vulkan-backed device, and the run goes on to device slot 26 (stop 7 indocs/retail_boot_chain.md).scripts/check_no_game_data.py: exit 0.Related, not changed here
make_game.py's Linux cross build doesn't pass-DLEONIDA_SDL3_FETCH=ON, and xwin has no SDL3. So the GameInput shim is never built for Wine users, and they hit this stop even with the alias. Passing the option frommake_game.pywould download the pinned, hash-checked SDL3 at configure time. The README says nothing is downloaded unless asked, so I left that choice to you; I can add it (or a flag for it) in a follow-up.AI-assisted (Claude Code). No game files, bytes or addresses in this PR.