Incorrect screen resolution being detected

Hi again,

graphics.GraphicsDevice.DisplayMode.Width and Height is always returning 640x480, when my screen is 2560x1600. All other fixes of this is a bug in a previous version of Monogame, but I’m using 3.8… Not really sure what to do…

Any help would be appreciated

Edit: Tried with an external monitor with a 1600x900 resolution, and GraphicsDevice.DisplayMode.Width and Height are still 640 and 480. Not sure what’s happening really

Edit2: I’ve found that the resolution is correctly identified if the game is in windowed form, so only fullscreen is bugged

Edit3: Curiously, the resolution is correctly identified right up until the first call to Draw is made, in the constructor, initialise load content and the first Update loop it is correct, then once it hits the draw call it is incorrect

What do graphics.GraphicsDevice.Viewport.Width & Height return?

I’m not sure DisplayMode is used for actual game window size.

Viewport width and height returns 320x180, which is the resolution I have set the preferred backbuffer width and height to

Not sure if this will help, but have a look at this:

Yup, I was being stupid. I was incorrectly scaling the game before making it fullscreen, sorry for the waste of time…

No need to apologize, and it’s not a waste of time. Hindsight usually makes things appear obvious…