mirror of https://github.com/encounter/SDL.git
4077f7a2d9
The Renderer logical scaling code scales mouse coordinates, and needs to take the window DPI into account on HIGHDPI windows. However, the variable which tracks this, renderer->dpi_scale, is set once when the renderer is created, and then not updated. In the event that the window is moved to another screen, or the screen DPI otherwise changes, this will be outdates, and potentially the coordinates will be all wrong. So let's update the dpi_scale on the SIZE_CHANGED event: it's at least a possibility that this will be issued on some OSes when DPI changes, and it's otherwise already handled by SDL_Renderer's event filter. |
||
---|---|---|
.. | ||
direct3d | ||
direct3d11 | ||
metal | ||
opengl | ||
opengles | ||
opengles2 | ||
psp | ||
software | ||
vitagxm | ||
SDL_d3dmath.c | ||
SDL_d3dmath.h | ||
SDL_render.c | ||
SDL_sysrender.h | ||
SDL_yuv_sw.c | ||
SDL_yuv_sw_c.h |