Windows 10 scale and layout affects window size
Just starting out messing around with Macroquad and it took me quite a while to figure out why my window on my 4k monitor was only being sized to 2560x1377, and it looks like using the windows 10 scale and layout feature affects the window screen size. Is this intended behavior?
From my, albeit limited, experience with window sizing in winnit or even in python, I believe the screen size was handled irrespective of this setting. Is there another component within macroquad that would manage this? Or would the OS window scaling have to be checked and accounted for outside of the macroquad feature set?
To be honest I do not really know what is "scale and layout" and what the intended behavior is here, but it might be a bug!
Its a fairly common setting in windows 10 that will change the size of the task bar, icons, text, etc, and is really useful if you have a higher resolution monitor. I have no idea how Microsoft implements this, but it looks like this was also an issue for winnit at some point and is more commonly referred to as dpi: https://github.com/rust-windowing/winit/issues/105.
I tried seeing if the high_dpi flag in the window config function handled this, but it looks like it either only works for some settings, or is for something else entirely and only happens to produce the expected outcome for 150% scaling.
for a 4k monitor with the high_dpi flag set, ~3840x2160 is expected (not taking into account the title bar) results:
- for 100% scaling: 5760x3145
- for 125% scaling: 4680x2497
- for 150% scaling (recommended): 3840x2065
- for 175% scaling: 3291x1756
for a 1440p monitor with the high_dpi flag set, ~2560x1440 is expected (not taking into account the title bar) results:
- for 100% scaling (recommended): 3840x2065
- for 125% scaling: 3072x1633
- for 150% scaling: 2559x1345
- for 175% scaling: 2193x1140