In my game, if I resize the window to fill the entire screen without actually maximizing the window, it runs at 59 FPS. If I hit the maximize button for the window, which isn't really changing the window size at all, since the window is already filling the screen, my FPS drops to 24 FPS. So with the same size window and the same code, the only difference is that the window is maximized. Any idea why this might be happening
Bill

Maximized window frame rate issue
madshi
Loopsludge
One can only hope...I've had too many of those...OK I went ahead and submitted it, it looks like there were a few other Vista related issues already entered.
Deejjaayy
Well as you probably know, Windows Vista is currently an unsupported platform for XNA as stated in the FAQ:
http://msdn2.microsoft.com/en-us/xna/aa937793.aspx
I think it's a significant possibility that Vista is the reason for the problem.
Have you tested a release build as opposed to a debug build
Cyanide13
Maybe one of them is not actually causing a device reset so the output is jsut being scaled. The other is actually resetting the device so you are drawing more pixels.
Put a break point in the LoadContent and see if its being hit or not
Christie Myburgh
Both types of resizing (draging the corner and maximizing) cause a LoadGraphicsContent(false) to be called, I'll put together a very simple example to reproduce this and post it.
Here is the example:
I have this test program which all it does is display the current frames per sec and allows user resizing. You can download it at http://www.bluerosegames.com/brg/MaximizeTest.zip
If someone could try it and see if they get the same results, please do the following:
1. resize the window to fill the entire screen (minus startbar, etc). Observer the frame rate.
2. hit the maximize button, and observe the new frame rate. I'm seeing a frame rate of a little less than half of the original frame rate.
3. Hit the restore button, and the frame rate should go back to its original value.
By the way, this is on Vista, so I don't know if that has something to do with it.
Thanks,
Bill
JGreene
BrentHecht
Zoomy8
Downloaded and tested it: I'm getting almost the same FPS rate on both modes: maximized and normal (the latter at almost the same size of the screen than the maximized mode's).
It just take a second or two to adjust and get the same FPS rate when switching but works ok.
One note: you should set the (un)loading of the spritebatch as manual, so:
if (spriteBatch != null)
{
spriteBatch.Dispose();
spriteBatch = null;
}
Then see what happens on Vista (haven't checked your "Draw" method yet, though).
Raulsassaa
But if I make the window the exact same size as it is when it's maximized without actually maximizing it, it's fine. I'm sure I'd get better framerates in full screen, but I'm just wondering what's going on.
Bill