aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {}
+
+ }
}
}
});