Skip to content

docs/gameinput.md: the retail executable reads the keyboard through GameInput too, and never asks for raw reports - #7637

Open
PinaTheOne wants to merge 1 commit into
ItsNotRexed:mainfrom
PinaTheOne:gameinput-exe-kinds
Open

PinaTheOne wants to merge 1 commit into
ItsNotRexed:mainfrom
PinaTheOne:gameinput-exe-kinds

Conversation

@PinaTheOne

Copy link
Copy Markdown

Claimed in the coordination issue as: new item (claim)

Related: #2413 (RT-159, keyboard and mouse devices and readings). This measurement bears on it; there is no textual overlap.

What and why

docs/gameinput.md states that "The title reads gamepads only" in its keyboard pad section, and later that "whether the title asks for raw reports at all is unknown". The executable answers both. I read its IGameInput call sites on my own 1.0.2.1 copy, without running anything; what is posted here is method names, enum names and counts only.

Method (slot) Calls inputKind Other
GetCurrentReading (4) 2 Gamepad 1, Keyboard 1
GetNextReading (5) 1 Keyboard
GetPreviousReading (6) 1 Gamepad
RegisterDeviceCallback (9) 2 Gamepad 1, Keyboard 1 statusFilter GameInputDeviceConnected in both
UnregisterCallback (13) 2
FindDeviceFromId (16) 1

What that means for the doc:

  • The title reads the keyboard through GameInput. The shim enumerates no keyboard and answers keyboard readings with nothing, so today the title sees no keyboard; the keyboard pad is a workaround for that. The doc now says so, points at GameInput: keyboard and mouse devices and readings (RT-159) #2413, and drops "reads gamepads only".
  • No call passes RawDeviceReport or Mouse. No other IGameInput method is called, including CreateDispatcher, so callbacks run on the shim's thread. The raw-reports line now says the title never asks.
  • The argument positions match the v0 signatures: the kind in edx for GetCurrentReading and in r8 for the other three, and the status filter in r9 for RegisterDeviceCallback. That is consistent with the v0 vtable the shim serves.

The new section "What the executable asks for" records the table and how it was read: the getter comes from tools/import_call_sites.py --import "GameInput.dll!#1", each use was followed to its vtable call in an llvm-objdump listing, and the constants were read there.

Tested

Docs only. Arch Linux, Python 3.14.10, CPU only.

  • tests/test_docs_links.py: the anchors this adds and uses (#what-the-executable-asks-for, #keyboard-pad, #how-it-runs, #verify) resolve.
  • test_docs_repo_paths.py, test_docs_table_rows.py, test_docs_list_items.py, test_docs_repeated_lines.py, test_docs_env_vars.py: OK.
  • test_docs_links.py and test_docs_cli_flags.py fail on main too, at docs/dev-tools.md and docs/embedded_shaders.md. None of their failures names docs/gameinput.md.
  • scripts/check_no_game_data.py docs/gameinput.md: clean.

AI-assisted: yes (Claude Code, Claude Opus 5.5)

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. Public GameInput method and enum names, slot numbers and counts only; no addresses or bytes from the executable.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

🤖 Generated with Claude Code

Read from the 1.0.2.1 executable's call sites (own copy; method names,
enum names and counts only). Its nine IGameInput method calls pass
GameInputKindGamepad and GameInputKindKeyboard, never RawDeviceReport or
Mouse: GetCurrentReading (Gamepad, Keyboard), GetNextReading (Keyboard),
GetPreviousReading (Gamepad), RegisterDeviceCallback (Gamepad, Keyboard;
statusFilter Connected), UnregisterCallback x2, FindDeviceFromId.

So "The title reads gamepads only" in the keyboard pad section is not
so: the title also reads the keyboard through GameInput, which the shim
answers with nothing (ItsNotRexed#2413 adds keyboard devices and readings). And the
open "whether the title asks for raw reports at all" is answered: it
never does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kapitche

Copy link
Copy Markdown
Contributor

Tested 580f825 merged with main 028548a on Linux/Python 3.12.16: pass

Docs-only change (docs/gameinput.md). Ran every tests/test_docs_*.py with python -I tests/<file>.py: all OK except test_docs_cli_flags and test_docs_links, which fail on docs/dev-tools.md lines that this PR does not touch (same failures on main); none of their failure lines mention the changed file.

No new tests are added, so there is no negative control. I read the diff against the repository state and found no inconsistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants