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

Move to SDL2 #149

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Move to SDL2 #149

wants to merge 13 commits into from

Conversation

shamazmazum
Copy link

Hello. This is my attempt to move to SDL2, making it possible to run this game natively on Wayland. The attempt is almost succeeded, but you cannot change screen resolution without restart now :(

So this is what you get:

  • Ability to run the game natively on Wayland.
  • Ability to type non-latin characters in highscores menu with new SDL text input event

And you cannot change screen resolution on the fly (You'll see a window saying to restart the game).

The latter really disappoints me and goes from the fact that GL context is now attached to a window (in SDL2 you can have many windows). So to resize a window you need to deal with already created one (or you need to reinitialize the whole GL context). I've tried to resize a window with SDL_SetWindowSize() if the game is in windowed mode (here is a link to the documentation), but for some reason the size does not change. Maybe the window must have SDL_WINDOW_RESIZABLE flag, but I think it is for WM/compositor. If you know how to solve this using SDL2, let me know. And if you think, it is OK to merge, I will be much grateful.

@ooxi
Copy link
Owner

ooxi commented Dec 10, 2019

Wow this is huge, thank you very much! I will need some time to test this and come back to you. Most likely a couple of commits will need to be squashed or merged before the SDL2 conversion, but all in all this looks very promising!

@ooxi
Copy link
Owner

ooxi commented Dec 29, 2019

Just to give you an update on this, currently looking into your patch. I will first fix the build on master in order to have reliable Travis CI information and then squash merge your patches, if no other issues com up.

@ooxi
Copy link
Owner

ooxi commented Jul 18, 2022

Unfortunately I was not able to verify this patch. Have you tested it on multiple platforms?

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.

2 participants