From c1fb37cdaff46d23717eac402abaea82e2a503f1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 21 Jul 2011 12:32:49 +0200 Subject: Use GlueGen Platform's OSType enum --- .../classes/jogamp/nativewindow/NativeWindowFactoryImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/nativewindow/classes/jogamp') diff --git a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java index 3db8f32d2..e3322ac45 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java +++ b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java @@ -32,6 +32,7 @@ package jogamp.nativewindow; +import com.jogamp.common.os.Platform; import com.jogamp.common.util.*; import java.lang.reflect.*; @@ -73,21 +74,21 @@ public class NativeWindowFactoryImpl extends NativeWindowFactory { private NativeWindow getAWTNativeWindow(Object winObj, AbstractGraphicsConfiguration config) { if (nativeWindowConstructor == null) { try { - String osType = getNativeWindowType(true); + String windowingType = getNativeWindowType(true); String windowClassName = null; // We break compile-time dependencies on the AWT here to // make it easier to run this code on mobile devices - if (osType.equals(TYPE_WINDOWS)) { + if (windowingType.equals(TYPE_WINDOWS)) { windowClassName = "jogamp.nativewindow.jawt.windows.WindowsJAWTWindow"; - } else if (osType.equals(TYPE_MACOSX)) { + } else if (windowingType.equals(TYPE_MACOSX)) { windowClassName = "jogamp.nativewindow.jawt.macosx.MacOSXJAWTWindow"; - } else if (osType.equals(TYPE_X11)) { + } else if (windowingType.equals(TYPE_X11)) { // Assume Linux, Solaris, etc. Should probably test for these explicitly. windowClassName = "jogamp.nativewindow.jawt.x11.X11JAWTWindow"; } else { - throw new IllegalArgumentException("OS " + getNativeOSName(false) + " not yet supported"); + throw new IllegalArgumentException("OS " + Platform.getOS() + " not yet supported"); } nativeWindowConstructor = ReflectionUtil.getConstructor( -- cgit v1.2.3