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_migration.cocci still refers to SDL_CreateWindowWithPosition #11035

Closed
icculus opened this issue Oct 2, 2024 · 4 comments
Closed

SDL_migration.cocci still refers to SDL_CreateWindowWithPosition #11035

icculus opened this issue Oct 2, 2024 · 4 comments
Assignees
Milestone

Comments

@icculus
Copy link
Collaborator

icculus commented Oct 2, 2024

SDL_migration.cocci has a wrong entry that almost every user is going to hit:

- SDL_CreateWindow(e1, e2, e3, e4, e5, e6)
+ SDL_CreateWindowWithPosition(e1, e2, e3, e4, e5, e6)

There's no CreateWindowWithPosition anymore; this needs to create an SDL_PropertiesID, put values for SDL_PROP_WINDOW_CREATE_X_NUMBER and SDL_PROP_WINDOW_CREATE_Y_NUMBER in it, call SDL_CreateWindowWithProperties, and then SDL_DestroyProperties.

I don't know how to correctly express that in this file, if someone else can take a run at it.

@icculus icculus added this to the 3.0 ABI milestone Oct 2, 2024
@icculus
Copy link
Collaborator Author

icculus commented Oct 2, 2024

(Or is it better to create the window hidden, call SDL_SetWindowPosition, then show it? I can't remember.)

@slouken
Copy link
Collaborator

slouken commented Oct 2, 2024

If the position is SDL_WINDOWPOS_UNDEFINED or SDL_WINDOWPOS_CENTERED, we can just use the new function and drop the position parameters. Otherwise, I think we don't touch it and let them look a the migration guide.

@icculus
Copy link
Collaborator Author

icculus commented Oct 2, 2024

Okay, I'll take care of this tonight.

@icculus icculus self-assigned this Oct 2, 2024
@icculus icculus closed this as completed in 1bb7e2b Oct 3, 2024
@icculus
Copy link
Collaborator Author

icculus commented Oct 3, 2024

Turns out we already had the UNDEFINED one, so I just removed the obsolete one.

(CENTERED we probably can't guarantee, so I left that alone, too.)

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