use of com.badlogic.gdx.backends.jglfw.JglfwGraphics.JglfwDisplayMode in project libgdx by libgdx.
the class JglfwApplicationConfiguration method getDisplayModes.
public static DisplayMode[] getDisplayModes() {
GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
java.awt.DisplayMode desktopMode = device.getDisplayMode();
java.awt.DisplayMode[] displayModes = device.getDisplayModes();
Array<DisplayMode> modes = new Array();
outer: for (java.awt.DisplayMode mode : displayModes) {
for (DisplayMode other : modes) if (other.width == mode.getWidth() && other.height == mode.getHeight() && other.bitsPerPixel == mode.getBitDepth())
// Duplicate.
continue outer;
if (mode.getBitDepth() != desktopMode.getBitDepth())
continue;
modes.add(new JglfwDisplayMode(mode.getWidth(), mode.getHeight(), mode.getRefreshRate(), mode.getBitDepth()));
}
return modes.toArray(DisplayMode.class);
}
Aggregations