Skip to content

Expose SDL_Gamepad* handle via PAD API#68

Merged
encounter merged 1 commit into
encounter:mainfrom
PJB3005:26-03-27-gamepad-expose
Mar 29, 2026
Merged

Expose SDL_Gamepad* handle via PAD API#68
encounter merged 1 commit into
encounter:mainfrom
PJB3005:26-03-27-gamepad-expose

Conversation

@PJB3005
Copy link
Copy Markdown
Contributor

@PJB3005 PJB3005 commented Mar 27, 2026

Will be using this in Dusk for input mapping etc

Will be using this in Dusk for input mapping etc
@Antidote
Copy link
Copy Markdown
Collaborator

I don't think this is a good idea, if you need more mapping functionality please create new PAD APIs, don't expose the underlying handle.

@Antidote Antidote closed this Mar 28, 2026
@encounter
Copy link
Copy Markdown
Owner

I looked over the associated PR and it's fine. We could probably expose SDL_GetGamepadType and SDL_GetGamepadButtonLabel via PAD API, but at the same time, I agree with the argument that we should allow using SDL APIs directly. We already do this for windowing (we hand the caller the SDL_Window* in AuroraInfo), so getting the SDL_Gamepad* handle also seems reasonable.

Yes, we should be careful to limit how much we rely on the underlying handles, and add Aurora APIs where it makes sense to, but we should not strive to reinvent the SDL API surface.

@encounter encounter reopened this Mar 29, 2026
@encounter encounter merged commit d5c0686 into encounter:main Mar 29, 2026
12 checks passed
@PJB3005 PJB3005 deleted the 26-03-27-gamepad-expose branch March 29, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants