summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java9
1 files changed, 8 insertions, 1 deletions
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) {