Skip to content

Steam Input: steam_input_get_gamepad_index_for_controller always returns -1 #159

@HolofighterDev

Description

@HolofighterDev

Description

I have the latest version of the extension and I've got a vanilla version of the example project. In that, I've opened up the input object and in update_handles, I've added one loop:

for (var i = 0; i < array_length(controllers); i++) {
   show_debug_message(steam_input_get_gamepad_index_for_controller(controllers[i]));
}

This prints out a steady stream of -1. It does this for every connected controller. Running the inverse function on an input of -1 produces the first controller handle the system detected, meaning any others are inaccessible. This indicates to me that this function is broken.

Expected Change

I expect that when I run the example project and connect a controller, using this function on a valid controller handle will return a gamepad index that I can use for input functionality, as it suggests in the documentation.

Sample Package

https://api.gamemaker.io/api/github/downloads/7cc3c026-cf8a-44ff-b546-a3eb55171d16

Steps To Reproduce

  1. Start GameMaker
  2. Run game
  3. Navigate to Input page
  4. Connect controller
  5. See the issue (continual stream of -1's in the output tab)

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.14.4.222 Steam

Which platform(s) are you seeing the problem on?

Windows

Metadata

Metadata

Assignees

Labels

SteamworksThis issue affects the specific named extensionextensionThis issue is to do with any of the official extensions
No fields configured for Extension Bug.

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions