-
Notifications
You must be signed in to change notification settings - Fork 108
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: distinguish between window size and screen size #1610
Conversation
It looks like the wrong render size is used at start-up when using |
SDL_GetWindowSize can be used to obtain the window size in logical points
7b64096
to
b837ce2
Compare
I've created a new issue for the issue I described: koreader/koreader#10427, as it was already present before my modifications. I'm also not entirely sure how to go about it. |
Related to koreader/koreader-base#1610. Not sure if this is actually needed, but for consistency the render buffer size should be used.
Related to koreader/koreader-base#1610. Not sure if this is actually needed, but for consistency the render buffer size should be used.
No surprise really, but it works on macOS. 👍 The Windows build is unmaintained, so no one can test that without a time investment to fix it up. |
Pointer input and window resize events use window coordinates. Fixes koreader#10420.
ea83968
to
c8252a8
Compare
Thanks! |
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.
Pointer input and window resize events use window coordinates. Fixes
koreader/koreader#10420.
I've tested this using SDL's wayland and x11 backends on both sway and plasma-wayland using no scaling, 150% and 200% output scaling. Scaling produces bad results on sway with the x11 backend, but it has done so before. I don't have access to macOS or a Windows system for testing.
This change is