Need a bit of wisdom…
Given a situation where I have multiple monitors with different native ratios on the same machine (1,7777, 1.6 etc);
And my application uses GraphicsDeviceManager.HardwareModeSwitch set to false;
I want to be able to move the application in window mode to any monitor and when switching to full screen on that monitor, to be able to get the ratio of THAT monitor I’m on. Doesn’t matter if I get the width/height and calculate myself or I get the AspectRatio.
The way I figured I need to do that is to identify on which monitor I am first, and maybe update the state when moving the window.
However, I don’t seem to find a good way to make that determination. Played around with the GraphicsAdapter. I am certain there is a mechanism somewhere, because each time I go full screen after moving the window to a new monitor, the game knows to go full screen on that monitor. Even if I play around in between monitors, there’s that perfect pixel in the middle that decides whether to fullscreen on one monitor or another.
Edit. I thought to play with the Window and that led me to the ClientBounds. I noticed that the X is global, so that could be a way, but what if I align the monitors in a weird way? Not convinced that I’m on the best path, but will continue to investigate this one for now.
Any other advice?
Thanks in advance!