From e0f76d28b5e84f69c8bd05a3b6fb414438f7e2b4 Mon Sep 17 00:00:00 2001 From: Gustavo Kissel Date: Mon, 23 Nov 2026 13:13:19 -0300 Subject: gameinput: serve GameInput.dll's ordinal 1, the retail executable's GameInputCreate import 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 5e45c7da942d7ac08fc57561e9ed924bcfc76476) --- runtime/test/gameinput_test.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/test/gameinput_test.cpp') diff --git a/runtime/test/gameinput_test.cpp b/runtime/test/gameinput_test.cpp index 4c48a35e6..93c48518b 100644 --- a/runtime/test/gameinput_test.cpp +++ b/runtime/test/gameinput_test.cpp @@ -1708,6 +1708,8 @@ int main() { check(create != nullptr, "gameinput.dll!GameInputCreate is registered"); check(rt::shims::find("xgameruntime.dll", "GameInputCreate") == reinterpret_cast(create), "xgameruntime.dll!GameInputCreate is the same function"); + check(rt::shims::find("gameinput.dll", "#1") == reinterpret_cast(create), + "gameinput.dll!#1 (the ordinal import) is the same function"); if (!create) return 1; IGameInput* input = nullptr; -- cgit v1.2.3