Scaling issues on multiple-monitor variable-DPI setups
I have a non-typical screen setup:
Screen 1 is 3840x2160@150%, and screen 2 is 1920x1080@100%.
Most UI or game framework handle this incorrectly, including first party Windows Task Manager.
I think I will still on similar setups in many years, until I can afford multiple 4K@144Hz/240Hz screens and a graphic card can power them for both working/gaming. You can simulate this by connecting a laptop to an external monitor, which usually use different dpi.
We are currently based on opentk, which doesn't handle per-monitor. It should be considered when abstracting the drawing layer.
WPF is handling dpi very well and fully open-sourced now. We (or probably I) should learn from them. Actually, osu is dpi-agnostic; everything is relative to window size. It should tell windows to totally bypass dpi.
Currently osu-framework behaviours like taskmgr: it tells system to be dpi-aware, and draws on exact pixels in Monitor1. But when dragged on Monitor2, system thinks it's still calculating "desired visual size in eye" using dpi on Monitor1 (which is totally not calculated in osu, everything is relative to window size), and rescaling the application. Expand the following screenshot, you will see everything blured.
Adding per-monitor dpi awareness to the manifest doesn't solve the problem; Windows thinks you are lying.
And the screen resolution in the screenshot is wrong too; Windows tell you the 150% of actual resolution, assuming you are calculating and drawing in the same dpi of Monitor1, and scale down when drawing to the screen.
IME is also handled badly. Windows draws IME in the application context, means it's get scaled and blurred together.
The full screenshot is too large then I have to describe what happens. The game is running on Monitor1, but IME appears on Monitor2 with blurred.
The only solution is right click in compatibility settings, and tell Windows api does get handled by application. This will make most thing work, except sizes of window titlebar and IME. IME is drawn on Monitor2 clearly with the size it should be in Monitor1.
Any update on this? I discovered tonight this was messing with my osu program's settings (1440p at 125% scaling was making osu resolution launch as 3200x1800 downsampling to 2560x1440) and since my tablet's settings are mapping to 2560x1440 it was basically not reflecting 1:1 properly/as expected.
I'm no longer having this configuration. Unfortunately I don't think it's easily addressable at osu-framework level. Windowing is handled by the underlying render provider like SDL.
Instead at application level, a manifest file for per-monitor dpi aware may help.
@tlosada100 try setting environment variable OSU_SDL3=1. SDL3 has proper multi monitor scaling support so it should work as expected.