-
Notifications
You must be signed in to change notification settings - Fork 104
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: Unbreak window state save & restore #1627
Conversation
Are you sure? If my memory doesn't betray me (but it might, I wrote that like five years ago?) the event only occurs when you plug in a controller, while normally it's already plugged in. |
Works for me on Linux w/ a Sony DS4v2, FWIW. |
Indeed, I can also confirm that it works on my Hori on SDL 2.26.5. |
Did you want to rebase it into two commits or just squash the whole thing together? |
Squash, definitely ;). |
Fix koreader/koreader#10502, regression since #1610
Well, only the size is a regression (plus, it was sortof an ffi/framebuffer API break, even if SDL is quirky in that fb.h / fb.w might not match fb.bb's dimensions because HiDPI shenanigans).
The position one is a bit of a mystery, we get an initial move event no matter what, for some reason, and without the explicit set, it's at the top left despite passing the right stuff to CreateWindow o_O.
Also dropped a duplicate openGameController call, as we handle it via an SDL_CONTROLLERDEVICEADDED event already.
This change is