aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2006-12-12 13:18:44 +0000
committerCarsten Weisse <[email protected]>2006-12-12 13:18:44 +0000
commitf4d92458eec1ec006e69bc5ab68aee29c599a4b7 (patch)
tree62af1f332284327fe48173d7300b42b57ddf03f8 /src
parent02d5de7e1516b0baad83d42be893137b09b39f22 (diff)
format only
Diffstat (limited to 'src')
-rw-r--r--src/jake2/render/opengl/Jsr231Driver.java80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/jake2/render/opengl/Jsr231Driver.java b/src/jake2/render/opengl/Jsr231Driver.java
index 9e6c3fa..4f1b841 100644
--- a/src/jake2/render/opengl/Jsr231Driver.java
+++ b/src/jake2/render/opengl/Jsr231Driver.java
@@ -220,7 +220,7 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
while (!canvas.isDisplayable() || !window.isDisplayable()) {
try {
- Thread.sleep(50);
+ Thread.sleep(100);
} catch (InterruptedException e) {}
}
canvas.requestFocus();
@@ -238,40 +238,40 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
}
public void shutdown() {
- try {
- EventQueue.invokeAndWait(new Runnable() {
- public void run() {
- if (oldDisplayMode != null
- && device.getFullScreenWindow() != null) {
- try {
- if (device.isFullScreenSupported()) {
- if (!device.getDisplayMode().equals(
- oldDisplayMode))
- device.setDisplayMode(oldDisplayMode);
-
+ try {
+ EventQueue.invokeAndWait(new Runnable() {
+ public void run() {
+ if (oldDisplayMode != null
+ && device.getFullScreenWindow() != null) {
+ try {
+ if (device.isFullScreenSupported()) {
+ if (!device.getDisplayMode().equals(
+ oldDisplayMode))
+ device.setDisplayMode(oldDisplayMode);
+
+ }
+ device.setFullScreenWindow(null);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ });
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ if (window != null) {
+ if (display != null) display.destroy();
+ window.dispose();
+ while (window.isDisplayable()) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
}
- device.setFullScreenWindow(null);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- });
- } catch (Exception e) {
- e.printStackTrace();
- }
- if (window != null) {
- if (display != null) display.destroy();
- window.dispose();
- while (window.isDisplayable()) {
- try {
- Thread.sleep(50);
- } catch (InterruptedException e) {
- }
+ }
}
- }
- display = null;
+ display = null;
}
/**
@@ -372,7 +372,7 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
public void removeNotify() {
if (drawable != null) {
- drawable.setRealized(false);
+ drawable.setRealized(false);
drawable = null;
}
super.removeNotify();
@@ -392,15 +392,15 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
release();
drawable.swapBuffers();
}
-
+
void destroy() {
- if (context != null) {
- release();
- context.destroy();
- context = null;
- }
+ if (context != null) {
+ release();
+ context.destroy();
+ context = null;
+ }
}
-
+
private static GraphicsConfiguration unwrap(AWTGraphicsConfiguration config) {
if (config == null) {
return null;