Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_Joystick type is not named after its struct #6856

Closed
tom-seddon opened this issue Dec 20, 2022 · 0 comments
Closed

SDL_Joystick type is not named after its struct #6856

tom-seddon opened this issue Dec 20, 2022 · 0 comments
Assignees
Milestone

Comments

@tom-seddon
Copy link

See

struct _SDL_Joystick;

This is hardly the end of the world, but it makes forward declaration more annoying, and use of the forward-declared type (particularly in C++) is then inconsistent.

Compare and contrast with, say, SDL_Window, which you can just forward declare using the name you'd use normally: https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_video.h#L95

(SDL_GameController, aka struct _SDL_GameController, suffers from the same problem.)

Thanks,

--Tom

P.S. identifiers that begin with an underscore and an uppercase letter are reserved by the standard. Feels like the chance of standard identifiers beginning with _SDL_ is low, but stranger things have happened

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

No branches or pull requests

2 participants