Allow display modes with 59 Hz refresh rate to be acceptable as 60 Hz

experimental
shadowislord 10 years ago
parent ef9c86bd24
commit 74dc3392c6
  1. 6
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java

@ -53,11 +53,11 @@ public class LwjglDisplay extends LwjglAbstractDisplay {
protected DisplayMode getFullscreenDisplayMode(int width, int height, int bpp, int freq){
try {
DisplayMode[] modes = Display.getAvailableDisplayModes();
for (DisplayMode mode : modes){
for (DisplayMode mode : modes) {
if (mode.getWidth() == width
&& mode.getHeight() == height
&& (mode.getBitsPerPixel() == bpp || (bpp==24&&mode.getBitsPerPixel()==32))
&& mode.getFrequency() == freq){
&& (mode.getBitsPerPixel() == bpp || (bpp == 24 && mode.getBitsPerPixel() == 32))
&& (mode.getFrequency() == freq || (freq == 60 && mode.getFrequency() == 59))) {
return mode;
}
}

Loading…
Cancel
Save