Removing Windowed support

Started by Matzon, April 04, 2004, 15:52:40

Previous topic - Next topic

K.I.L.E.R

I found myself using windowed mode until I found out how to create a fullscreen mode.

So far I believe FS is better but I would love to be able to change the res in fullscreen.

cfmdobbie

Try something like the following:

DisplayMode[] modes = Display.getAvailableDisplayModes();
booleas success = false;
for(int i = 0 ; i < modes.length && !success ; i++)
{
  if(modes[i].width == 1024 && modes[i].height == 768)
  {
    try
    {
      Display.setDisplayMode(modes[i]);
      success = true;
    }
    catch(LWJGLException e)
    {
      // Mode not supported
    }
  }
  else
  {
    // Not interested in this mode
  }
}
if(!success)
{
  // Failed to set mode
}
else
{
  // Display mode set!  Hurrah!
}
ellomynameis Charlie Dobbie.

K.I.L.E.R

DOH! Thanks. :D

I can't believe I hadn't thought of doing it that way.  :?