Skip to content

[macOS] SDL2-2.0.14 sends two SDL_CONTROLLERDEVICEADDED events when my Xbox One X controller is attached #4732

@pcbeard

Description

@pcbeard

A simple SDL2 program that calls SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER), and waits for SDL_CONTROLLERDEVICEADDED events to arrive, receives two events when my Xbox One X controller is attached. They have distinct SDL_JoystickGUID and SDL_JoystickID values and their names are:

"Xbox One S Controller"
"Xbox Wireless Controller"

If I connect both of them, I see double SDL_JOYBUTTONDOWN / SDL_JOYBUTTONUP and SDL_JOYAXISMOTION events. For the controller that's called "Xbox Wireless Controller", the actual SDL_GameControllerButton values are incorrect. They are correct for the "Xbox One S Controller" controller.

Note, if I change the program to use SDL_Init(SDL_INIT_GAMECONTROLLER), this double connection doesn't happen and the correct controller is identified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions