Bug 1169

Summary: ScreenResSelector doesn't use the right mean of detecting multi bit depth
Product: [JogAmp] Jogl Reporter: Julien Gouesse <gouessej>
Component: awtAssignee: Julien Gouesse <gouessej>
Status: RESOLVED WORKSFORME    
Severity: trivial CC: gouessej, sgothel
Priority: P5    
Version: 2.4.0   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
Workaround: ---

Description Julien Gouesse 2015-07-02 11:01:38 CEST
This demo assumes that java.awt.DisplayMode.getBitDepth() returns a strictly negative number when multiple bit depths are supported:
https://github.com/sgothel/jogl-demos/blob/master/src/demos/util/ScreenResSelector.java#L66

Actually, the documentation indicates that there is only one possible value in this case:
http://docs.oracle.com/javase/7/docs/api/java/awt/DisplayMode.html#getBitDepth()

It should use java.awt.DisplayMode.BIT_DEPTH_MULTI:
http://docs.oracle.com/javase/7/docs/api/java/awt/DisplayMode.html#BIT_DEPTH_MULTI
Comment 1 Sven Gothel 2015-10-09 06:37:21 CEST
pls fix ..
Comment 2 Sven Gothel 2019-03-30 03:13:06 CET
(In reply to Sven Gothel from comment #1)
> pls fix ..

and java.awt.DisplayMode.BIT_DEPTH_MULTI == -1

well, closing this bug report for this old 2003 demo ;-)