From 74dc3392c6d16df01659e8135819381efbdcdbd6 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sun, 1 Feb 2015 17:15:36 -0500 Subject: [PATCH] Allow display modes with 59 Hz refresh rate to be acceptable as 60 Hz --- .../src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java b/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java index 1974e5137..f74076c2c 100644 --- a/jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java +++ b/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.getHeight() == height + && (mode.getBitsPerPixel() == bpp || (bpp == 24 && mode.getBitsPerPixel() == 32)) + && (mode.getFrequency() == freq || (freq == 60 && mode.getFrequency() == 59))) { return mode; } }