From: Carsten W. <ca...@us...> - 2006-12-11 22:16:10
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4472/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: hope this helps on win32 screen mode switching Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Jsr231Driver.java 11 Dec 2006 21:56:10 -0000 1.19 --- Jsr231Driver.java 11 Dec 2006 22:16:06 -0000 1.20 *************** *** 139,144 **** * fullscreen handling */ ! GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); ! device = env.getDefaultScreenDevice(); if (oldDisplayMode == null) { --- 139,146 ---- * fullscreen handling */ ! if (device == null) { ! GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); ! device = env.getDefaultScreenDevice(); ! } if (oldDisplayMode == null) { *************** *** 202,213 **** } else { - // Not much point in having a full-screen window in this - // case - device.setFullScreenWindow(null); final Frame f2 = window; try { EventQueue.invokeAndWait(new Runnable() { public void run() { - f2.setVisible(false); f2.setLocation(window_xpos, window_ypos); f2.pack(); --- 204,211 ---- *************** *** 250,255 **** && device.getFullScreenWindow() != null) { try { ! if (device.isFullScreenSupported()) ! device.setDisplayMode(oldDisplayMode); device.setFullScreenWindow(null); } catch (Exception e) { --- 248,256 ---- && device.getFullScreenWindow() != null) { try { ! if (device.isFullScreenSupported()) { ! if (!device.getDisplayMode().equals(oldDisplayMode)) ! device.setDisplayMode(oldDisplayMode); ! ! } device.setFullScreenWindow(null); } catch (Exception e) { |