aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-12-31 08:01:28 +0100
committerSven Gothel <[email protected]>2013-12-31 08:01:28 +0100
commite7032ae9ca4b754bd9737f86d9496211e9155db4 (patch)
tree244965b4e43d22473f308badbd8dbfd5a1d2683f /src/newt/classes/com
parent852fcbf1b8d87e35884082e792ff0ac6fdeed3a7 (diff)
NEWT Cleanup - Remove Type Casts and OSX Newt/Fmod Workaround (Early WindowImpl initialization)
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/Display.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java17
2 files changed, 7 insertions, 12 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
index a0a098481..4469189a8 100644
--- a/src/newt/classes/com/jogamp/newt/Display.java
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -222,7 +222,7 @@ public abstract class Display {
synchronized(displayList) {
int i = fromIndex >= 0 ? fromIndex : displayList.size() - 1 ;
while( ( incr > 0 ) ? i < displayList.size() : i >= 0 ) {
- final Display display = (Display) displayList.get(i).get();
+ final Display display = displayList.get(i).get();
if( null == display ) {
// Clear GC'ed dead reference entry!
displayList.remove(i);
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
index 5ae3f3692..157e2bb3c 100644
--- a/src/newt/classes/com/jogamp/newt/NewtFactory.java
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -59,11 +59,6 @@ public class NewtFactory {
@Override
public Object run() {
NativeWindowFactory.initSingleton(); // last resort ..
-
- // Work-around for initialization order problems on Mac OS X
- // between native Newt and (apparently) Fmod
- WindowImpl.init(NativeWindowFactory.getNativeWindowType(true));
-
return null;
} } );
}
@@ -320,9 +315,9 @@ public class NewtFactory {
public static boolean isScreenCompatible(NativeWindow parent, Screen childScreen) {
// Get parent's NativeWindow details
- AbstractGraphicsConfiguration parentConfig = (AbstractGraphicsConfiguration) parent.getGraphicsConfiguration();
- AbstractGraphicsScreen parentScreen = (AbstractGraphicsScreen) parentConfig.getScreen();
- AbstractGraphicsDevice parentDevice = (AbstractGraphicsDevice) parentScreen.getDevice();
+ AbstractGraphicsConfiguration parentConfig = parent.getGraphicsConfiguration();
+ AbstractGraphicsScreen parentScreen = parentConfig.getScreen();
+ AbstractGraphicsDevice parentDevice = parentScreen.getDevice();
DisplayImpl childDisplay = (DisplayImpl) childScreen.getDisplay();
String parentDisplayName = childDisplay.validateDisplayName(null, parentDevice.getHandle());
@@ -343,9 +338,9 @@ public class NewtFactory {
public static Screen createCompatibleScreen(NativeWindow parent, Screen childScreen) {
// Get parent's NativeWindow details
- AbstractGraphicsConfiguration parentConfig = (AbstractGraphicsConfiguration) parent.getGraphicsConfiguration();
- AbstractGraphicsScreen parentScreen = (AbstractGraphicsScreen) parentConfig.getScreen();
- AbstractGraphicsDevice parentDevice = (AbstractGraphicsDevice) parentScreen.getDevice();
+ AbstractGraphicsConfiguration parentConfig = parent.getGraphicsConfiguration();
+ AbstractGraphicsScreen parentScreen = parentConfig.getScreen();
+ AbstractGraphicsDevice parentDevice = parentScreen.getDevice();
if(null != childScreen) {
// check if child Display/Screen is compatible already