mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 22:45:50 +00:00
Add a public DisplayMode constructor
This commit is contained in:
parent
0baf3a81f2
commit
b88624e608
5 changed files with 43 additions and 13 deletions
|
|
@ -46,17 +46,38 @@ public final class DisplayMode {
|
|||
|
||||
/** properties of the display mode */
|
||||
private final int width, height, bpp, freq;
|
||||
/** If true, this instance can be used for fullscreen modes */
|
||||
private final boolean fullscreen;
|
||||
|
||||
/**
|
||||
* Construct a display mode.
|
||||
*
|
||||
* Construct a display mode. DisplayModes constructed through the
|
||||
* public constructor can only be used to specify the dimensions of
|
||||
* the Display in windowed mode. To get the available DisplayModes for
|
||||
* fullscreen modes, use Display.getAvailableDisplayModes().
|
||||
*
|
||||
* @param width The Display width.
|
||||
* @param height The Display height.
|
||||
* @see Display
|
||||
*/
|
||||
private DisplayMode(int width, int height, int bpp, int freq) {
|
||||
public DisplayMode(int width, int height) {
|
||||
this(width, height, 0, 0, false);
|
||||
}
|
||||
|
||||
DisplayMode(int width, int height, int bpp, int freq) {
|
||||
this(width, height, bpp, freq, true);
|
||||
}
|
||||
|
||||
private DisplayMode(int width, int height, int bpp, int freq, boolean fullscreen) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.bpp = bpp;
|
||||
this.freq = freq;
|
||||
this.fullscreen = fullscreen;
|
||||
}
|
||||
|
||||
/** True iff this instance can be used for fullscreen modes */
|
||||
boolean isFullscreen() {
|
||||
return fullscreen;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue