Hello Guest

Removing Windowed support

  • 17 Replies
  • 13033 Views
Removing Windowed support
« Reply #15 on: April 17, 2004, 02:54:08 »
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.

Removing Windowed support
« Reply #16 on: April 17, 2004, 08:31:00 »
Try something like the following:

Code: [Select]
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.

Removing Windowed support
« Reply #17 on: April 17, 2004, 16:42:46 »
DOH! Thanks. :D

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