You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DOSBox Staging calls SDL_WarpMouseInWindow() when releasing mouse cursor to center it in the window (whether that's a good idea is a separate topic). It was noticed that using DPI-scaled coordinates works as expected on macOS, but on Windows with HiDPI enabled the cursor lands closer to the upper-left corner instead, suggesting that real pixels are used there as coordinates.
Here's an example code. Left click will try to center the cursor based on DPI-scaled coordinates, and right click - on real pixels. This was tested on up-to-date Windows 10 machine (SDL 2.28 RC 1) and macOS 11 (SDL 2.26.5), confirming the above behaviour. Also tested in X11 (no concept of DPI scaling, so the cursor always lands dead-center), native Wayland, and XWayland (both do not allow the cursor to budge), with SDL 2.26.5.
I'm personally not worried about Wayland's behaviour, but it would be nice to at least document the difference between Windows and macOS.
The text was updated successfully, but these errors were encountered:
DOSBox Staging calls
SDL_WarpMouseInWindow()
when releasing mouse cursor to center it in the window (whether that's a good idea is a separate topic). It was noticed that using DPI-scaled coordinates works as expected on macOS, but on Windows with HiDPI enabled the cursor lands closer to the upper-left corner instead, suggesting that real pixels are used there as coordinates.Here's an example code. Left click will try to center the cursor based on DPI-scaled coordinates, and right click - on real pixels. This was tested on up-to-date Windows 10 machine (SDL 2.28 RC 1) and macOS 11 (SDL 2.26.5), confirming the above behaviour. Also tested in X11 (no concept of DPI scaling, so the cursor always lands dead-center), native Wayland, and XWayland (both do not allow the cursor to budge), with SDL 2.26.5.
I'm personally not worried about Wayland's behaviour, but it would be nice to at least document the difference between Windows and macOS.
The text was updated successfully, but these errors were encountered: