@egon:
Hmmm :-/
Here’s the mode selection. width, height and refresh come from config.xml
DisplayMode[] modes = Display.getAvailableDisplayModes();
if (modes.length < 1) {
throw new Exception("Could not set a display mode.");
}
// Try to select a preferred display mode (800x600, 32 or 16 bit, 60Hz preferred any other accepted)
for (int i = 0; i < modes.length; i++) {
if (modes[i].width == width && modes[i].height == height // screen dimensions must be correct
&& modes[i].bpp >= bits // prefer highest bit depth possible
&& modes[i].bpp != 24 // except 24 bits
&& modes[i].freq <= 90 // filter out high refresh rates,
// some video drivers incorrectly report too high rates
// choose 1st potential mode or mode with higher color depth or a mode with preferred refresh rate
&& (mode<0 || modes[i].bpp > modes[mode].bpp || (modes[mode].freq != refresh && modes[i].freq == refresh)) ) {
System.out.println("Maybe selecting mode " + modes[i].toString());
mode = i;
}
}
// If no mode is found, do a loose selection of any display mode reported by the driver as available.
if (mode == -1) {
System.out.print("Failed to choose preferred display mode, falling back to any mode:");
mode = 0;
System.out.println(modes[mode].toString());
}
//Display.create(modes[mode], fullscreenflag);
Display.setDisplayMode(modes[mode]);
I can’t see the error and it works for me when I set the refresh rate at 85 in config.xml, although I could probably make the code a bit more clever. Does someone spot the error?
As for the black screen problem, I’m still totally lost about why this happens on some machines. There’s nothing special in the menu. Just a couple of quads. :-/
If it would have something to do with depthbuffer/near clipping, you wouldn’t see the hud in the game as well. And you do see it there, do you? (I have the same problem on my PC at work and I can see the hud in the game).
Again, thanks for testing everybody.
Erik