Skip to content

Harden Steam Input gamepad slot mapping - #175

Open
Infiland wants to merge 1 commit into
YoYoGames:mainfrom
Infiland:issue-159-steam-input-gamepad-index
Open

Harden Steam Input gamepad slot mapping#175
Infiland wants to merge 1 commit into
YoYoGames:mainfrom
Infiland:issue-159-steam-input-gamepad-index

Conversation

@Infiland

@Infiland Infiland commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #159.

Summary

  • Reject invalid XInput slot values outside 0..3 in steam_input_get_controller_for_gamepad_index instead of forwarding them to Steam.
  • Try Steam's reverse lookup in steam_input_get_gamepad_index_for_controller, then fall back to scanning slots 0..3 and comparing controller handles.
  • Update the docs to state that invalid slots return 0 and unmapped handles return -1.

Validation

  • git diff --check
  • xcodebuild -list -project source/Steamworks_gml/extensions/steamworks/steamworks_macos/Steamworks.xcodeproj
  • Checked Steamworks ISteamInput documentation for GetControllerForGamepadIndex and GetGamepadIndexForController behavior.

Notes

Native build verification is blocked in this checkout because source/Steamworks_sdk/steam_api.h is not present locally, and the normal macOS build also requires the project signing certificate.

@ksuchitra532 ksuchitra532 moved this to Triage in Team Workload Jul 28, 2026
@stuckie stuckie moved this from Triage to Backlog in Team Workload Jul 29, 2026
@ksuchitra532 ksuchitra532 moved this from Backlog to Triage in Team Workload Jul 30, 2026
@stuckie stuckie moved this from Triage to Backlog in Team Workload Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Steam Input: steam_input_get_gamepad_index_for_controller always returns -1

4 participants