Skip to content
This repository was archived by the owner on Mar 2, 2025. It is now read-only.
This repository was archived by the owner on Mar 2, 2025. It is now read-only.

SDL Joystick information might change unexpectedly #31

@JayFoxRox

Description

@JayFoxRox

I believe SDL expects no updates to return values of SDL_JoystickNameForIndex or SDL_NumJoysticks inbetween SDL event pumping and / or SDL_JoystickUpdate. Otherwise there might be race conditions.

Imagine these steps in an app:

  1. A user asks SDL for the number of connected joystick devices
  2. User disconnects the USB device
  3. User takes device count from step 1. to loop over SDL joystick devices to ask for their name

I don't think our driver respects this.
We should check if / how other backends take care of this.

See #30 for another description of this / why I think this is violated.

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