1
\$\begingroup\$

I've been following the Eye of the Dragon tutorial, which is basicly a guide to making a 2D RPG game, obviously.

I recently finished the tutorial about making pop up screens in the menu and changed the screen to load as a full screen.

Whenever I try and load the game it just goes black and my mouse sits there. I cannot change out of it other then with CtrlAltDel. Once i do that it says No suitable graphics card found, unable to create graphics device.

I read somewhere about XNA not allowing more then one screen when any one of them is full screen. but it wasnt very informative. Anyone have any ideas whats going on and/or how to fix this?

Just incase if this helps this is the code for the graphics device:

public Game1()
{
    graphics = new GraphicsDeviceManager(this);
    graphics.PreferredBackBufferWidth = 900;
    graphics.PreferredBackBufferHeight = 768;
    graphics.IsFullScreen = true;
    this.Window.Title = "Eyes of the Dragon";
    Content.RootDirectory = "Content";
}
\$\endgroup\$
7
  • \$\begingroup\$ I suspect you're getting the "no suitable graphics card" error because you're pressing ctrl-alt-delete. This is because you're switching from the Default Desktop to the Winlogon Desktop (MSDN). Your game runs on the default desktop, and while that desktop is inactive, it cannot access the graphics device - hence the error. \$\endgroup\$ Jun 21, 2013 at 10:30
  • \$\begingroup\$ Try creating a fresh game using the default XNA game template (the "cornflower blue" screen, add the code for full screen (what you've posted) and see if that works. (Is your problem with your full-screen code? Or is it elsewhere? Try to reproduce it with as little code as possible.) \$\endgroup\$ Jun 21, 2013 at 10:33
  • \$\begingroup\$ Try adding 'GraphicsGevice.GraphicsDeviceInformation.PresentationParameters.FullScreenRefreshRateInHz = 60;' \$\endgroup\$ Jun 21, 2013 at 19:47
  • \$\begingroup\$ I'm actually a bit confused by the black screen at first. Sounds like something gets stuck. It doesn't happen in windowed mode? \$\endgroup\$
    – Mario
    Jun 21, 2013 at 21:00
  • \$\begingroup\$ @AndrewRussell Hitting Ctrl+Alt+Del shouldn't just crash the game. It will (at least did so under XP; haven't done DirectX for ages) invalidate the context, but XNA should handle all that stuff on its own, without any noticeable impact. \$\endgroup\$
    – Mario
    Jun 21, 2013 at 21:01

1 Answer 1

1
\$\begingroup\$

Are you sure your resolution is right and supported by both your graphics card and your monitor? To me it sounds like that's not the case.

What happens if you pick 1024x768? You can't just pick any (fullscreen) resolution you want and expect it to work.

If you need such an odd resolution for whatever reason, use transformations to properly scale the output.

Some cards might be able to still properly transform/scale this through drivers. E.g. Nvidia cards got a setting for upscaling (whether it's done by the monitor or graphics card). If it's done by the card, I think it will accept pretty much any resolution (which doesn't mean you should do it).

\$\endgroup\$
3
  • 1
    \$\begingroup\$ XNA is supposed to automatically fall-back to an available resolution, if you select something invalid - hence the "Preferred*". (Although valid modes can be enumerated with GraphicsAdapter.DefaultAdapter.SupportedDisplayModes). \$\endgroup\$ Jun 21, 2013 at 10:23
  • \$\begingroup\$ Ah okay, so that's essentially built in. I guess the same would be true for refresh rate? \$\endgroup\$
    – Mario
    Jun 21, 2013 at 20:58
  • \$\begingroup\$ Yes, I think so. \$\endgroup\$ Jun 22, 2013 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .