aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2006-12-11 22:51:09 +0000
committerCarsten Weisse <[email protected]>2006-12-11 22:51:09 +0000
commit8f697e3797ecdace952145312b55d474680bf364 (patch)
tree89d0848a2b3108c0801575331f70ce335576354d /src
parent007dcbf40ccbca12064d3c2ef7e25631c276421d (diff)
exit thread removed because of linux
Diffstat (limited to 'src')
-rw-r--r--src/jake2/render/opengl/Jsr231Driver.java61
1 files changed, 26 insertions, 35 deletions
diff --git a/src/jake2/render/opengl/Jsr231Driver.java b/src/jake2/render/opengl/Jsr231Driver.java
index b9b61a5..b065032 100644
--- a/src/jake2/render/opengl/Jsr231Driver.java
+++ b/src/jake2/render/opengl/Jsr231Driver.java
@@ -238,49 +238,40 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
}
public void shutdown() {
- Thread exit = new Thread(new Runnable() {
- public void run() {
+ 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();
- }
}
+ device.setFullScreenWindow(null);
+ } catch (Exception e) {
+ e.printStackTrace();
}
- });
- } catch (Exception e) {
- e.printStackTrace();
- }
- if (window != null) {
- display.destroy();
- window.dispose();
- while (window.isDisplayable() || display.isDisplayable()) {
- try {
- Thread.sleep(50);
- } catch (InterruptedException e) {}
-
}
}
+ });
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ if (window != null) {
+ display.destroy();
+ window.dispose();
+ while (window.isDisplayable() || display.isDisplayable()) {
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException e) {
+ }
+
}
- });
- exit.start();
- try {
- exit.join();
- } catch (InterruptedException e) {
}
display = null;
-
}
/**