gameinput: serve GameInput.dll's ordinal 1 again (RT-GAMEINPUT-ORD1) #127

Manually merged
github merged 1 commit from gh-pr/127/head into gh-pr/127/base 2026-11-26 08:45:25 +00:00
Owner

@⁠Mumogg on GitHub · 2026-11-24 02:24 UTC · original
Mumogg:gameinput-ordinal-1 → main · +6 −0 · 2 files · 1 commits · merged 2026-11-24 03:36 UTC

Claimed in #14 as RT-GAMEINPUT-ORD1.

What and why

The retail executable imports GameInputCreate from GameInput.dll by ordinal 1, and the loader looks an ordinal import up as #1. On main 9ec34cdff the shim table has no #1 entry, so the import binds 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.

This is commit 5e45c7da9 by Gustavo Kissel, cherry-picked unchanged (-x, authorship kept). It is an ancestor of main, but the change is no longer in the tree, so a merge does not bring it back.

Measured

Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, SDL3 fetched, own 1.0.2.1 copy, network off.

  • main 9ec34cdff, gta6rt --run: the title's own int3 0.65 s after start, 0 D3D12 calls. tools/int3_cause.py names the call whose result leads there: GameInput.dll!#1. The import listing shows it bound to the host, and Wine's builtin gameinput module is loaded.
  • With this change the import is listed as shim, the log has the gameinput: SDL 3.4.20 gamepads line, and the run goes on to the next stop (with the DirectStorage shim of the companion PR: D3D12XboxCreateDevice ok).
  • gameinput_test under Wine: 364 checks, 0 failures (it includes the check for the #1 alias).

Not tested on Windows: there the host DLL answers either way, so this should change nothing but which code serves the call.

AI-assisted (Claude Code); built and run on the machine above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt

**@⁠Mumogg** on GitHub · 2026-11-24 02:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/127) `Mumogg:gameinput-ordinal-1` → `main` · +6 −0 · 2 files · 1 commits · merged 2026-11-24 03:36 UTC Claimed in #14 as `RT-GAMEINPUT-ORD1`. ### What and why The retail executable imports `GameInputCreate` from `GameInput.dll` by ordinal 1, and the loader looks an ordinal import up as `#1`. On `main` `9ec34cdff` the shim table has no `#1` entry, so the import binds 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. This is commit `5e45c7da9` by Gustavo Kissel, cherry-picked unchanged (`-x`, authorship kept). It is an ancestor of `main`, but the change is no longer in the tree, so a merge does not bring it back. ### Measured Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, SDL3 fetched, own 1.0.2.1 copy, network off. - `main` `9ec34cdff`, `gta6rt --run`: the title's own `int3` 0.65 s after start, 0 D3D12 calls. `tools/int3_cause.py` names the call whose result leads there: `GameInput.dll!#1`. The import listing shows it bound to the host, and Wine's builtin `gameinput` module is loaded. - With this change the import is listed as `shim`, the log has the `gameinput: SDL 3.4.20 gamepads` line, and the run goes on to the next stop (with the DirectStorage shim of the companion PR: `D3D12XboxCreateDevice ok`). - `gameinput_test` under Wine: 364 checks, 0 failures (it includes the check for the `#1` alias). Not tested on Windows: there the host DLL answers either way, so this should change nothing but which code serves the call. AI-assisted (Claude Code); built and run on the machine above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
The retail executable imports GameInputCreate from GameInput.dll by ordinal 1. The loader looks ordinal imports up
as "#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 #1 to the same GameInputCreate, and gameinput_test checks it.

(cherry picked from commit 5e45c7da94)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:45:23 +00:00
github manually merged commit e0f76d28b5 into gh-pr/127/base 2026-11-26 08:45:25 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.