Comment 32 for bug 103537

Revision history for this message
In , Focht (focht) wrote :

Created attachment 68725
Compiled Java test case to demonstrate ChoosePixelFormat PFD_SUPPORT_GDI issue

Hello folks,

I've precompiled the small Java test app and attach it here for reference.

Copy/pasta source and instructions from my previous comment #13

--- snip ---
// compile: wine "c:\\jdk1.3.0_03\\bin\\javac.exe" -g GraphicsTest.java
// run: wine "c:\\jdk1.3.0_03\\bin\\java.exe" GraphicsTest

import java.awt.*;

public class GraphicsTest {

    public static void main(String[] args) {

        GraphicsEnvironment ge = GraphicsEnvironment.
                getLocalGraphicsEnvironment();
        GraphicsDevice[] gs = ge.getScreenDevices();
        for (int j = 0; j < gs.length; j++) {

            System.err.println("Getting config for " + gs[j].getIDstring());
            long startTime = System.currentTimeMillis() ;
            GraphicsConfiguration[] gc = gs[j].getConfigurations();
            System.err.println("Finished in " + (System.currentTimeMillis() - startTime) + " milliseconds");
        }
    }
}
--- snip ---

It should print:

--- snip ---
Unable to create a suitable default GraphicsConfiguration. Try changing your Display Settings.
        at sun.awt.Win32GraphicsDevice.getDefaultPixID(Native Method)
        at sun.awt.Win32GraphicsDevice.getConfigurations(Win32GraphicsDevice.java:73)
        at GraphicsTest.main(GraphicsTest.java:17)
--- snip ---

After fixing the problem:

--- snip ---
Getting config for \Display0
Finished in 45 milliseconds
Getting config for \Display1
Finished in 3 milliseconds
--- snip ---

(I have two monitors)

Regards