From f5c253726a1d5cef310cd8159df716b580b3bac4 Mon Sep 17 00:00:00 2001 From: Brian Matzon Date: Fri, 28 Mar 2003 23:47:20 +0000 Subject: [PATCH] fix: rewritten windowed/fullscreen selection --- .../org/lwjgl/test/input/MouseCreationTest.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/java/org/lwjgl/test/input/MouseCreationTest.java b/src/java/org/lwjgl/test/input/MouseCreationTest.java index df0b3cd8..bb7ca5e5 100644 --- a/src/java/org/lwjgl/test/input/MouseCreationTest.java +++ b/src/java/org/lwjgl/test/input/MouseCreationTest.java @@ -65,7 +65,7 @@ public class MouseCreationTest { public MouseCreationTest() { } - private void initialize() { + private void initialize(boolean fullscreen) { // find first display mode that allows us 640*480*16 DisplayMode[] modes = Display.getAvailableDisplayModes(); for (int i = 0; i < modes.length; i++) { @@ -78,7 +78,12 @@ public class MouseCreationTest { } try { - gl = new GL("MouseCreationTest", 50, 50, 640, 480, 32, 0, 0, 0); + if(fullscreen) { + Display.setDisplayMode(displayMode); + gl = new GL("MouseCreationTest", 16, 0, 0, 0); + } else { + gl = new GL("MouseCreationTest", 50, 50, 640, 480, 16, 0, 0, 0); + } gl.create(); glu = new GLU(gl); @@ -96,7 +101,7 @@ public class MouseCreationTest { } public void executeTest() { - initialize(); + initialize(false); System.out.println("Test ready:\n"); @@ -118,7 +123,7 @@ public class MouseCreationTest { System.out.print("Entering fullscreen mode..."); try { gl.destroy(); - initialize(); + initialize(true); Display.setDisplayMode(displayMode); } catch (Exception e) { e.printStackTrace();