-
Notifications
You must be signed in to change notification settings - Fork 16
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
base: master
Are you sure you want to change the base?
Move to SDL2 #149
Conversation
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! |
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. |
Unfortunately I was not able to verify this patch. Have you tested it on multiple platforms? |
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:
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 haveSDL_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.