I am in an advanced state in my Windows desktop game and I just realized that when I am running my game in windowed mode (graphics.IsFullScreen = false;) the rendering window’s size is absolutely wrong. My laptop’s actual resolution is 1920x1080, and setting the prefferedbackbuffersize to 1680x1050 the window almost completly fills my screen, moreover, the height of the window exceeds the limit of my screen. In fullscreen mode, everything is fine.
At first I thought that I am doing something wrong, so I tried it with a brand new Windows Desktop project, Monogame 3.4 and only set the preferredbackbuffer size and the IsFullScreen properties to what I mentioned. I tried it in:
- the game’s constructor
- the init method
- the load method
- the update method
with ApplySettings() of course, and still the size is totally wrong.
I tried it on my work PC as well, with the same full HD resolution, but with a 24" monitor, and the result is the same. What else is missing? I tried the window’s borderless property as well, the result was the same, so the problem has nothing to do with the borders.
Has anyone else experienced the same? It looks very amateur if the game does not properly resizes its rendering window when in windowed mode and I would not release the game until this error is solved. Thanks!