Open MrDoubleA232 opened 1 year ago
I've been thinking about this topic a bit.
Some things I had in mind, that you accounted for and I'm glad to see:
Some things I think it's missing:
rcWork
rcNormalPosition
within the WINDOWPALCEMENT structure, then call SetWindowPlacement with no changes to other fields. When constraining the value of rcNormalPosition
, make note that it uses workspace coordinates, rather than screen coordinates like SetWindowPos
and monitorInfo.rcWork
do, so there's going to be an offset.In addition. I was thinking about the idea of implementing a Graphics.adjustWindowScale()
function which accepts no arguments, and bundles together what I'd consider the "best practice" for what to do following a change in framebuffer size:
rcNormalPosition
size rather than current size so you get the restore size if it's fullscreen currently)This method tries to combine respecting whatever the player has done with window size already, with rounding to a clean-looking window size of the appropriate aspect ratio.
This is really helpful feedback! I'll try to implement the points that you mentioned into this once I get the chance.
Adds two FFI functions:
If there are any issues with this implementation or a better way to go about things, let me know!