diff options
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r-- | src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java | 11 | ||||
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java | 5 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java index b13cf4317..d054c205b 100644 --- a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java +++ b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java @@ -40,7 +40,7 @@ import java.lang.reflect.*; import javax.media.nativewindow.*; public final class NWReflection { - public static final boolean DEBUG = Debug.debug("NWReflection"); + public static final boolean DEBUG = true; /* Debug.debug("NWReflection"); */ public static final boolean isClassAvailable(String clazzName) { try { @@ -69,7 +69,11 @@ public final class NWReflection { try { factory = factoryClass.getDeclaredConstructor( cstrArgTypes ); } catch(NoSuchMethodException nsme) { - throw new NativeWindowException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found"); + nsme.printStackTrace(); + throw new NativeWindowException("Constructor: '" + clazzName + "("+cstrArgTypes+")' not found"); + } catch (Throwable th) { + th.printStackTrace(); + throw new NativeWindowException(th); } return factory; } catch (Throwable e) { @@ -91,6 +95,9 @@ public final class NWReflection { factory = getConstructor(clazzName, cstrArgTypes); return factory.newInstance( cstrArgs ) ; } catch (Exception e) { + if (DEBUG) { + e.printStackTrace(); + } throw new NativeWindowException(e); } } diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index cbd485649..d4684c783 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -48,6 +48,9 @@ import com.sun.nativewindow.impl.jvm.JVMUtil; public abstract class NativeWindowFactory { protected static final boolean DEBUG = Debug.debug("NativeWindow"); + /** Broadcom EGL type */ + public static final String TYPE_BROADCOM_EGL = "BroadcomEGL"; + /** OpenKODE/EGL type */ public static final String TYPE_EGL = "EGL"; @@ -82,6 +85,8 @@ public abstract class NativeWindowFactory { private static String _getNativeWindowingType(String osNameLowerCase) { if (osNameLowerCase.startsWith("kd")) { return TYPE_EGL; + } else if (osNameLowerCase.startsWith(TYPE_BROADCOM_EGL.toLowerCase())) { + return TYPE_BROADCOM_EGL; } else if (osNameLowerCase.startsWith("wind")) { return TYPE_WINDOWS; } else if (osNameLowerCase.startsWith("mac os x") || |