YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

DInput duplicate gamepad devices for XInput gamepads require filtering on Windows platform #8425

Closed offalynne closed 8 hours ago

offalynne commented 6 days ago

Description

Filing issue per Russel's request for LTS2025

In certain circumstances, the XInput filter fails to ignore the associated DInput device, with one connected gamepad resulting in two output devices for GM. As such, the DInput index needs to be "blocked" upon gamepad discovery, so that GM does not treat 1 gamepad device as if it were 2.

Here are GUIDs that always indicate a duplicate device, and should be blocked:

03000000710100001904000000000000 Amazon Luna Controller
030000005e040000050b000000000000 Xbox Elite Controller
030000005e040000130b000000000000 Xbox Series Controller
030000005e040000220b000000000000 Xbox Series Controller
030000005e040000200b000000000000 Xbox Series Controller

In case of a GUID match to any of the above, the gamepad index should behave as if none is connected, so:

  1. The Async - System gamepad discovery event should not be registered
  2. The Async - System DS map async_load should not push "gamepad discovered" or "pad_index" to async_load
  3. The index should return false from gamepad_is_connected()
  4. The index should return "none" from gamepad_get_guid()
  5. The index should return "" from gamepad_get_description()

These GUIDs are platform-unique, (other platforms result in different GUIDs for these same devices) so there is no explicit need for this change to be platform-selective.

If anyone assigned to this lacks a device to test, I suggest testing another DInput device on hand (eg. PlayStation controller) to confirm the implemented blocking method works. Upon follow up I am glad to confirm a working solution locally with a relevant device from the list.

See also #8425, #8426, #8427, #8428

Expected Change

No response

Steps To Reproduce

Pair gamepad, observe issue

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

Always

Which version of GameMaker are you reporting this issue for?

2024.8.1 (Monthly)

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

Windows

Sample Package Attached?

Sample Project Added?

rwkay commented 8 hours ago

Fix added to internal develop version should be in 2024.13 Beta

offalynne commented 5 hours ago

Confirmed good with Xbox and Luna controllers