upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/gameinput_test.cpp
diff options
context:
space:
mode:
authorGustavo Kissel <kisselgustavo@gmail.com>2026-11-23 13:13:19 -0300
committerMumogg <104529023+Mumogg@users.noreply.github.com>2026-11-23 20:23:21 -0600
commite0f76d28b5e84f69c8bd05a3b6fb414438f7e2b4 (patch)
tree05a01b8fe80c7311e2bc6b027ffc4ee48147f768 /runtime/test/gameinput_test.cpp
parent9ec34cdff41b19d7671bc260e5f40dc69790d905 (diff)
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)
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
-rw-r--r--runtime/test/gameinput_test.cpp2
1 files changed, 2 insertions, 0 deletions
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() {
1708 check(create != nullptr, "gameinput.dll!GameInputCreate is registered"); 1708 check(create != nullptr, "gameinput.dll!GameInputCreate is registered");
1709 check(rt::shims::find("xgameruntime.dll", "GameInputCreate") == reinterpret_cast<void*>(create), 1709 check(rt::shims::find("xgameruntime.dll", "GameInputCreate") == reinterpret_cast<void*>(create),
1710 "xgameruntime.dll!GameInputCreate is the same function"); 1710 "xgameruntime.dll!GameInputCreate is the same function");
1711 check(rt::shims::find("gameinput.dll", "#1") == reinterpret_cast<void*>(create),
1712 "gameinput.dll!#1 (the ordinal import) is the same function");
1711 if (!create) return 1; 1713 if (!create) return 1;
1712 1714
1713 IGameInput* input = nullptr; 1715 IGameInput* input = nullptr;