Resolution independence failure

Hi!

I’m building a game in which graphics are all rendered to a render target, and then that render target is drawn to the screen buffer. I’ve done this so that I can make my game at a chosen resolution (1920x1080) and then easily scale it to whatever resolution the user desires.

This all works, but with two irritating problems:

  1. When setting the final resolution to be smaller (say 1280x720), the position of the game view is only correct when the game is set to borderless window mode (it is either a smaller view centred on the screen, or scaled up to fullscreen, depending on my graphics card’s scaling mode). When set to proper fullscreen mode, the game view remains small and is set to the top-left of the monitor. I can’t find any way to center it, or make it fill the monitor.

  2. When in borderless windowed mode, despite getting everything drawing correctly, the game seems to think that the game window is in a different place from the drawn graphics, meaning that when I click my mouse towards the left or top of my game view, the operating system thinks that I’m clicking outside of the game window and shifts focus away from the game.

I hope I have explained that clearly enough. I don’t expect anyone to be able to tell me exactly what to do, but if anyone has any ideas of things to look into, or things I might be misunderstanding, then I’d be most grateful.

Many thanks :slight_smile:

What is the value of your GraphicsDeviceManager’s HardwareModeSwitch when setting fullscreen?