diff options
author | Sven Gothel <[email protected]> | 2019-11-22 17:16:55 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-11-22 17:16:55 +0100 |
commit | 30826d978258c16b06cdab34e5a4265406545c3f (patch) | |
tree | 44cf076460a6a947754d5b923ece87e6c296f0db /src/nativewindow/classes/jogamp | |
parent | 4b9754d210b22f32e5f083d3524da8f3d886bfb7 (diff) |
Bug 1156: EGL-GBM: Fix NativeWindowFactory native-window-type query according to Bug 1156
- Special files like '/dev/dri/card0' can't be tested via isFile(), use exists()
Order for GNU/Linux (and other unices) IMHO is
1) Display Server (Vendor neutral)
1.1) running X11 display server (DISPLAY check enough?)
1.2) running WAYLAND display server (WAYLAND_DISPLAY check enough?)
2) Console Mode Vendor Neutral
2.1) GBM (how to check?)
3) Console Mode Vendor Specific
3.1) VCIV (how to check)
Diffstat (limited to 'src/nativewindow/classes/jogamp')
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/BcmVCArtifacts.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/BcmVCArtifacts.java b/src/nativewindow/classes/jogamp/nativewindow/BcmVCArtifacts.java index 216c55a3a..0fc0665bc 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/BcmVCArtifacts.java +++ b/src/nativewindow/classes/jogamp/nativewindow/BcmVCArtifacts.java @@ -53,7 +53,7 @@ public class BcmVCArtifacts { public Object run() { res[0] = vcLibLocation.isFile(); res[1] = vc4ModLocation.isDirectory(); - res[2] = driCard0Location.isFile(); + res[2] = driCard0Location.exists(); // not a normal file return null; } } ); hasVCLib = res[0]; @@ -64,13 +64,19 @@ public class BcmVCArtifacts { /** * @return True if proprietary BCM VC IV is probably being present */ - public static final boolean guessVCIVPresent() { + public static final boolean guessVCIVPresent(final boolean debug) { + if( debug ) { + System.err.println("guessVCIVPresent: hasVCLib "+hasVCLib); + } return hasVCLib; } /** * @return True if proprietary BCM VC IV is probably being used and not Xorg drivers */ - public static final boolean guessVCIVUsed() { + public static final boolean guessVCIVUsed(final boolean debug) { + if( debug ) { + System.err.println("guessVCIVUsed: hasVCLib = "+hasVCLib+" && !hasVC4ModLocation = !"+hasVC4ModLocation+" && !hasDriCard0File = !"+hasDriCard0File); + } return hasVCLib && !hasVC4ModLocation && !hasDriCard0File; } } |