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:
2026-06-20 11:51:58 +02:00
parent b1f8783321
commit edf2da69d8
8 changed files with 528 additions and 7 deletions

View File

@@ -0,0 +1,84 @@
// Steam Input In-Game Actions (IGA) manifest for CoopAllTheThings.
//
// SteamInputSource points Steam Input at this file via
// ISteamInput::SetInputActionManifestFilePath, so the host doesn't depend on a
// partner-backend-registered config. It declares one action set, "GameControls",
// with the standard gamepad buttons + two sticks + two triggers. The action names
// here must match host/src/input/steam_input_source.cpp.
"In Game Actions"
{
"actions"
{
"GameControls"
{
"title" "#Set_GameControls"
"legacy_set" "1"
"StickPadGyro"
{
"LeftStick"
{
"title" "#Action_LeftStick"
"input_mode" "joystick_move"
}
"RightStick"
{
"title" "#Action_RightStick"
"input_mode" "joystick_move"
}
}
"AnalogTrigger"
{
"LeftTrigger" "#Action_LeftTrigger"
"RightTrigger" "#Action_RightTrigger"
}
"Button"
{
"A" "#Action_A"
"B" "#Action_B"
"X" "#Action_X"
"Y" "#Action_Y"
"LB" "#Action_LB"
"RB" "#Action_RB"
"Back" "#Action_Back"
"Start" "#Action_Start"
"LStickClick" "#Action_LStickClick"
"RStickClick" "#Action_RStickClick"
"DPadUp" "#Action_DPadUp"
"DPadDown" "#Action_DPadDown"
"DPadLeft" "#Action_DPadLeft"
"DPadRight" "#Action_DPadRight"
"Guide" "#Action_Guide"
}
}
}
"localization"
{
"english"
{
"Set_GameControls" "Game Controls"
"Action_LeftStick" "Left Stick"
"Action_RightStick" "Right Stick"
"Action_LeftTrigger" "Left Trigger"
"Action_RightTrigger" "Right Trigger"
"Action_A" "A"
"Action_B" "B"
"Action_X" "X"
"Action_Y" "Y"
"Action_LB" "Left Bumper"
"Action_RB" "Right Bumper"
"Action_Back" "Back"
"Action_Start" "Start"
"Action_LStickClick" "Left Stick Click"
"Action_RStickClick" "Right Stick Click"
"Action_DPadUp" "D-Pad Up"
"Action_DPadDown" "D-Pad Down"
"Action_DPadLeft" "D-Pad Left"
"Action_DPadRight" "D-Pad Right"
"Action_Guide" "Guide"
}
}
}