[XNA] Default to Best Resolution
First off, which forum is the forum for XNA questions? I had been putting them in .NET, but I saw someone put one in here, and I would assume this forum gets more traffic. Anyways, back to my question:
Is there a way, in XNA, that I can default to the highest resolution possible on the system it's running on? Or, some way I can get that information so that I can set it myself?
As a noob myself of XNA I suggest to ask on the forum on XNA framework. I don't know how to do what you are asking yet, but I do believe that there is a video tutorial on creating a full game. That mite enplane on creating everything from windows and controls.
Do a search on "Rocket Commander, Video, Tutorial, C#".
Do a search on "Rocket Commander, Video, Tutorial, C#".
Okay, I found it.
I guess this doesn't choose the maximum necessarily, but it'll choose whatever the current desktop resolution is, which, in most cases, the user has set as the highest.
graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
I guess this doesn't choose the maximum necessarily, but it'll choose whatever the current desktop resolution is, which, in most cases, the user has set as the highest.
graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement