I have a function with the following code in it:
GameStateManagementGame.GraphicsDeviceManager.PreferredBackBufferWidth = width;
GameStateManagementGame.GraphicsDeviceManager.PreferredBackBufferHeight = height;
GameStateManagementGame.GraphicsDeviceManager.IsFullScreen = isFullScreen;
GameStateManagementGame.GraphicsDeviceManager.ApplyChanges();
When it's called at application start, if isFullScreen = true, there is very noticeable screen flicker for a second or 2 even if the width and height are the same as the desktop resolution. If I don't have the ApplyChanges(); call this doesn't happen (but the settings do get applied). If I call the function after the game has fully started without the ApplyChanges() call, the settings don't get applied.
Now I can solve this problem by putting something in to skip the ApplyChanges() call at startup but I'd like to know why this is happening.
The only information I've managed to find regarding this problem say that the flicker shouldn't happen if you're using the same resolution as the desktop or have provided overcomplicated and broken workarounds.
So my question is what is the reason for the behaviour described above and what's the best workaround?