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

New versioning scheme breaks some applications #6177

Closed
Pixelnarium opened this issue Sep 3, 2022 · 6 comments
Closed

New versioning scheme breaks some applications #6177

Pixelnarium opened this issue Sep 3, 2022 · 6 comments

Comments

@Pixelnarium
Copy link

Pixelnarium commented Sep 3, 2022

Hello,

I just found out that the new versioning scheme in libSDL may break applications. It is of course a bug inside the application itself and not a bug on SDLs side. But given that libSDL tries to be compatible I just want to mention it. I tried it inside Flatpak via the flatpak-gog project with the newest runtime 22.08. This runtime ships the new libSDL 2.24.0 and so I found out about this.

When I tried to run Stardew Valley with the new libSDL library (game ships its own but can be changed with SDL_DYNAMIC_API environment variable) it just exits with the message:

SDL 2.0.4 does not support changing resizable parameter of the window after it's already been created, please use a newer version of it

It runs fine with libSDL before the new versioning scheme. While searching for it I found out that pygame was also affected by this: pygame/pygame#3427

Since I could not find any news about this I want to make people aware of this. Setting SDL_DYNAMIC_API globally may break your games with the newest libSDL.

edit: Changed link to upstream pygame issue

@cgutman
Copy link
Collaborator

cgutman commented Sep 3, 2022

Maybe we should create a SDL_HINT_LEGACY_VERSION hint that causes SDL_GetVersion() to return a version in the old format. I assume that's where these applications are getting the SDL version from (rather than parsing OS-specific version resources in the executable itself).

@icculus
Copy link
Collaborator

icculus commented Sep 3, 2022

I sent ConcernedApe (the Stardew Valley person) a DM on Twitter to see if they want to take a look at this in the game.

If it's a handful of things that broke, and it's possible to fix them, I'd rather do that, since a hint is going to be an extra step for users to deal with and it's going be arcane knowledge on every title, but we'll see if it comes to that.

@icculus
Copy link
Collaborator

icculus commented Sep 3, 2022

Actually, wait, @flibitijibibo, was Stardew Valley one of your titles?

@flibitijibibo
Copy link
Collaborator

Sadly no, this was done by Sickhead and is MonoGame-based. But, that means I know where the bug is:

https://github.com/MonoGame/MonoGame/blob/a9e5ae6befc40d7c86320ffdcfcd9d9b66f786a8/MonoGame.Framework/Platform/SDL/SDLGameWindow.cs#L16

CC @mrhelmut, this needs to check the minor version in addition to the patch version!

@mrhelmut
Copy link

mrhelmut commented Sep 4, 2022

Thanks for the ping! Going to patch that.

EDIT: this is now fixed in the current development branch of MonoGame (and scheduled for MonoGame 3.8.2/3.9.0).

@slouken
Copy link
Collaborator

slouken commented Sep 4, 2022

PyGame and MonoGame both have fixes on the way, I'll go ahead and close this for now.

@slouken slouken closed this as completed Sep 4, 2022
slouken added a commit that referenced this issue Sep 27, 2022
Workaround for #6177 for games that can't be updated.
jarod-clark pushed a commit to jarod-clark/SDL that referenced this issue Sep 28, 2022
Workaround for libsdl-org#6177 for games that can't be updated.
PJB3005 pushed a commit to PJB3005/SDL that referenced this issue Oct 5, 2022
Workaround for libsdl-org#6177 for games that can't be updated.
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

6 participants