|
From: Brian M. <ma...@us...> - 2003-03-28 23:47:24
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input In directory sc8-pr-cvs1:/tmp/cvs-serv30307 Modified Files: MouseCreationTest.java Log Message: fix: rewritten windowed/fullscreen selection Index: MouseCreationTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/MouseCreationTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/MouseCreationTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- MouseCreationTest.java 28 Mar 2003 22:12:39 -0000 1.7 +++ MouseCreationTest.java 28 Mar 2003 23:47:20 -0000 1.8 @@ -65,7 +65,7 @@ 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 @@ } 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 void executeTest() { - initialize(); + initialize(false); System.out.println("Test ready:\n"); @@ -118,7 +123,7 @@ System.out.print("Entering fullscreen mode..."); try { gl.destroy(); - initialize(); + initialize(true); Display.setDisplayMode(displayMode); } catch (Exception e) { e.printStackTrace(); |