From 007dcbf40ccbca12064d3c2ef7e25631c276421d Mon Sep 17 00:00:00 2001 From: Carsten Weisse Date: Mon, 11 Dec 2006 22:44:38 +0000 Subject: hope this helps on win32 screen mode switching --- src/jake2/render/opengl/Jsr231Driver.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/jake2/render/opengl/Jsr231Driver.java') diff --git a/src/jake2/render/opengl/Jsr231Driver.java b/src/jake2/render/opengl/Jsr231Driver.java index a9d44e1..b9b61a5 100644 --- a/src/jake2/render/opengl/Jsr231Driver.java +++ b/src/jake2/render/opengl/Jsr231Driver.java @@ -218,7 +218,7 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver { } } - while (!canvas.isDisplayable()) { + while (!canvas.isDisplayable() || !window.isDisplayable()) { try { Thread.sleep(50); } catch (InterruptedException e) {} @@ -265,6 +265,12 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver { if (window != null) { display.destroy(); window.dispose(); + while (window.isDisplayable() || display.isDisplayable()) { + try { + Thread.sleep(50); + } catch (InterruptedException e) {} + + } } } }); -- cgit v1.2.3