diff options
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java | 14 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/NewtFactory.java | 9 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index 89d476a3b..40aaa8a25 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -57,25 +57,25 @@ public abstract class NativeWindowFactory { protected static final boolean DEBUG; /** OpenKODE/EGL type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}.*/ - public static final String TYPE_EGL = "jogamp.newt.driver.kd".intern(); + public static final String TYPE_EGL = ".egl".intern(); /** Microsoft Windows type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_WINDOWS = "jogamp.newt.driver.windows".intern(); + public static final String TYPE_WINDOWS = ".windows".intern(); /** X11 type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_X11 = "jogamp.newt.driver.x11".intern(); + public static final String TYPE_X11 = ".x11".intern(); /** Android/EGL type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}.*/ - public static final String TYPE_ANDROID = "jogamp.newt.driver.android".intern(); + public static final String TYPE_ANDROID = ".android".intern(); /** Mac OS X type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_MACOSX = "jogamp.newt.driver.macosx".intern(); + public static final String TYPE_MACOSX = ".macosx".intern(); /** Generic AWT type, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_AWT = "jogamp.newt.driver.awt".intern(); + public static final String TYPE_AWT = ".awt".intern(); /** Generic DEFAULT type, where platform implementation don't care, as retrieved with {@link #getNativeWindowType(boolean)}. String is canonical via {@link String#intern()}. */ - public static final String TYPE_DEFAULT = "default".intern(); + public static final String TYPE_DEFAULT = ".default".intern(); private static final String nativeWindowingTypePure; // canonical String via String.intern() private static final String nativeWindowingTypeCustom; // canonical String via String.intern() diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java index 0644c9164..abae94ab6 100644 --- a/src/newt/classes/com/jogamp/newt/NewtFactory.java +++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java @@ -49,6 +49,8 @@ import jogamp.newt.WindowImpl; public class NewtFactory { public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window"); + public static final String DRIVER_DEFAULT_ROOT_PACKAGE = "jogamp.newt.driver"; + // Work-around for initialization order problems on Mac OS X // between native Newt and (apparently) Fmod static { @@ -59,7 +61,12 @@ public class NewtFactory { public static Class<?> getCustomClass(String packageName, String classBaseName) { Class<?> clazz = null; if(packageName!=null && classBaseName!=null) { - final String clazzName = packageName + "." + classBaseName ; + final String clazzName; + if( packageName.startsWith(".") ) { + clazzName = DRIVER_DEFAULT_ROOT_PACKAGE + packageName + "." + classBaseName ; + } else { + clazzName = packageName + "." + classBaseName ; + } try { clazz = Class.forName(clazzName); } catch (Throwable t) { |