GraphicsDevice.Viewport.Height is reporting 1008 instead of 1080

I’m having problems after installing the Windows 10 1709 update. My game now has black bars on both sides and the bottom. Is anybody having similar problems? I’m using independent resolution code because I’m working on a 2d pixel art game. Everything was fine before installing the new Windows 10 update.

The rendered image seems to be thin instead of 1920 now has 1792 (128 pixels less -64 on the left and -64 on the right). 64 seems to be a very suspect number. In addition the graphics are offset -72 vertically. Have a look at the screenshot below:


GraphicsDevice.Viewport.Height is reporting 1008 instead of 1080!!!

Try an empty project and set it to 1920 x 1080 should work.

This way you can find out if it’s some problem on your system/monogame or your code.

Monogame is reporting this wrong value. It is a bug from Monogame or some problem from the new Windows Update. Now, I’m using GraphicsDevice.DisplayMode instead and works fine.

This is likely because of dpi scaling. See this comment:

1 Like