aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2006-12-11 22:44:38 +0000
committerCarsten Weisse <[email protected]>2006-12-11 22:44:38 +0000
commit007dcbf40ccbca12064d3c2ef7e25631c276421d (patch)
tree81cfa2fdb43b75f18af5770c7e4b60a292c24761 /src/jake2/render
parent081523f2ecfc3a03b278c1a29f26ccbcc08e72f2 (diff)
hope this helps on win32 screen mode switching
Diffstat (limited to 'src/jake2/render')
-rw-r--r--src/jake2/render/opengl/Jsr231Driver.java8
1 files changed, 7 insertions, 1 deletions
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) {}
+
+ }
}
}
});