feat(gameinput): add GameInputInitialize, the public v0 entry point #39

Open
github-bot wants to merge 1 commit from github-bot/gh-39 into main AGit
Owner

@⁠wildheathen on GitHub · 2026-11-21 19:28 UTC · original
wildheathen:feat/gameinput-initialize → main · +38 −0 · 3 files · 1 commits · open

Summary

Adds GameInputInitialize, the public v0 entry point of GameInput, to GameInput.dll:

int32_t GameInputInitialize(const void* riid, void** out_game_input);

The shim exposes the v0 IGameInput vtable, so only the v0 IID is accepted; any other IID answers E_NOINTERFACE, as a v0 runtime would. A null output pointer is E_INVALIDARG, and a null riid is treated as an unsupported IID. On success it creates the instance exactly like GameInputCreate.

Signature and IID from the public GameInput reference (learn.microsoft.com).

Tests

tests/test_gameinput.cpp: the v0 IID returns a working IGameInput (timestamp through both the vtable and the flat API, then destroyed), an unrelated IID gives E_NOINTERFACE with a null output, and a null output pointer gives E_INVALIDARG.

Verification

  • Built with MSVC + Ninja x64. Full suite: everything passes except the three tests that already fail on an unmodified origin/main (test_boot_hello_scarlett, test_boot_rt_showcase, test_d3d12_guest_texture; see #1 and #2).
**@⁠wildheathen** on GitHub · 2026-11-21 19:28 UTC · [original](https://github.com/Freminet/ScarlettX/pull/39) `wildheathen:feat/gameinput-initialize` → `main` · +38 −0 · 3 files · 1 commits · open ## Summary Adds `GameInputInitialize`, the public v0 entry point of GameInput, to `GameInput.dll`: ```cpp int32_t GameInputInitialize(const void* riid, void** out_game_input); ``` The shim exposes the v0 `IGameInput` vtable, so only the v0 IID is accepted; any other IID answers `E_NOINTERFACE`, as a v0 runtime would. A null output pointer is `E_INVALIDARG`, and a null `riid` is treated as an unsupported IID. On success it creates the instance exactly like `GameInputCreate`. Signature and IID from the public GameInput reference (learn.microsoft.com). ## Tests `tests/test_gameinput.cpp`: the v0 IID returns a working `IGameInput` (timestamp through both the vtable and the flat API, then destroyed), an unrelated IID gives `E_NOINTERFACE` with a null output, and a null output pointer gives `E_INVALIDARG`. ## Verification - Built with MSVC + Ninja x64. Full suite: everything passes except the three tests that already fail on an unmodified `origin/main` (`test_boot_hello_scarlett`, `test_boot_rt_showcase`, `test_d3d12_guest_texture`; see #1 and #2).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:56:44 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/39/head:github-bot/gh-39'
git switch 'github-bot/gh-39'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-39'
git switch 'github-bot/gh-39'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-39'
git switch 'github-bot/gh-39'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-39'
git switch 'main'
git merge --squash 'github-bot/gh-39'
git switch 'main'
git merge --ff-only 'github-bot/gh-39'
git switch 'main'
git merge 'github-bot/gh-39'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.