Steam Input as the primary guest-input path (optional, SDK-gated)
Add SteamInputSource: initializes SteamAPI + Steam Input, loads a bundled action manifest via SetInputActionManifestFilePath (no partner-backend config needed), and reads the GameControls action set into CoopPadState -- falling back to XInput per slot, and to pure XInput if Steam isn't available, so the host always runs. Enabled automatically when the Steamworks SDK is vendored at third_party/steamworks_sdk/ (auto-detected by CMake; gitignored and never committed -- the build is XInput-only without it). Stages steam_api64.dll + the manifest next to the host and builds coop_steam_input_probe (a console smoke test). Verified: the probe initializes against the live Steam client and enumerates controllers; the host degrades gracefully when launched standalone. All 5 tests pass. Reading actual controller state needs a pad bound through Steam Input for the running (donor) appid, which XInput otherwise covers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
29
README.md
29
README.md
@@ -19,7 +19,7 @@ XInput game becomes Remote-Play-Together-able.
|
||||
|
||||
| Concern | Mechanism | Component | Status |
|
||||
| --- | --- | --- | --- |
|
||||
| Receive guest input | XInput (RPT delivers guest pads to the focused window) | `coop_host.exe` | done |
|
||||
| Receive guest input | Steam Input (primary, when built with the Steamworks SDK) with XInput fallback; RPT delivers guest pads to the focused window | `coop_host.exe` | done |
|
||||
| Forward input to game | DLL injection + XInput hook (SafetyHook) — game sees *only* our pad | `coop_hook.dll` | done |
|
||||
| Keep game running unfocused | Hook spoofs focus so the game polls while the host holds OS focus | `coop_hook.dll` | done |
|
||||
| Mirror video | Windows Graphics Capture of the game window, letterboxed into the host window | `coop_host.exe` | done |
|
||||
@@ -155,10 +155,21 @@ Done:
|
||||
all subsystems hooked, and the IPC channels (status, audio ring, video share,
|
||||
log) all flow across the x64↔x86 boundary.
|
||||
|
||||
Future work, roughly in priority order:
|
||||
- **Steam Input. ✅** When the host is built with the Steamworks SDK
|
||||
(auto-detected under `third_party/steamworks_sdk/`), guest input comes through
|
||||
the Steam Input API (action-based) as the primary path, falling back to XInput
|
||||
per slot — and to pure XInput if Steam isn't available, so the host always runs.
|
||||
It initializes SteamAPI + Steam Input and loads a bundled action manifest
|
||||
(`steam_input_actions.vdf`) via `SetInputActionManifestFilePath`, so it needs no
|
||||
partner-backend config. Verified to initialize against the live Steam client and
|
||||
enumerate controllers (`coop_steam_input_probe`). Reading actual button/stick
|
||||
state still requires a controller bound through Steam Input for the running
|
||||
appid (the donor appid under RPT) — without that binding the XInput path carries
|
||||
the guest input, as before.
|
||||
|
||||
- **Steam Input:** consume guest input through the Steam Input API directly
|
||||
rather than XInput.
|
||||
All planned phases are now implemented. Possible later work: per-stream audio
|
||||
mixing for multi-stream games, per-stream format detection for the audio hook, and
|
||||
hooking D3D9 / pure-D3D12 present paths for the video hook.
|
||||
|
||||
## Building
|
||||
|
||||
@@ -180,8 +191,14 @@ configured into `build/x86/`) that produces `coop_hook_x86.dll` and
|
||||
it with `-DCOOP_BUILD_X86_HELPER=OFF` if you don't need 32-bit support.
|
||||
|
||||
Third-party dependencies (Dear ImGui, SafetyHook) are git submodules under
|
||||
`third_party/`; the Steamworks SDK is vendored manually there when wired. No
|
||||
vcpkg / package manager is used.
|
||||
`third_party/`. No vcpkg / package manager is used.
|
||||
|
||||
**Steam Input is optional.** It's enabled automatically when the Steamworks SDK is
|
||||
vendored at `third_party/steamworks_sdk/` (extract the `steamworks_sdk_*.zip`
|
||||
there). The SDK isn't redistributable, so it's gitignored and never committed; if
|
||||
it's absent the host builds XInput-only (no other features depend on it). When
|
||||
present, the build links `steam_api64.lib`, stages `steam_api64.dll` and the
|
||||
action manifest next to the host, and also builds `coop_steam_input_probe`.
|
||||
|
||||
### clangd / IDE setup
|
||||
|
||||
|
||||
Reference in New Issue
Block a user