mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-21 09:36:24 +00:00
Handle DPI scaling in SDL_GetWindowSurface
Fixes DPI awareness of testdrawchessboard (previously, the surface was
being created in points instead of pixels, resulting in the demo app
only drawing in a corner of the screen on High-DPI displays)
*_CreateWindowFramebuffer()/*_UpdateWindowFramebuffer(): are updated
to use SDL_GetWindowSizeInPixels instead of SDL_GetWindowSize() or
window->w/window->h.
Most of the _CreateWindowFramebuffer backends are untested except
for Windows.
Fixes #7047
(cherry picked from commit 67c91353e0)
This commit is contained in:
committed by
Sam Lantinga
parent
3a5abee512
commit
76392f4fe1
@@ -1342,7 +1342,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
|
||||
*
|
||||
* \param window the window to update
|
||||
* \param rects an array of SDL_Rect structures representing areas of the
|
||||
* surface to copy
|
||||
* surface to copy, in pixels
|
||||
* \param numrects the number of rectangles
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
|
||||
Reference in New Issue
Block a user