*** empty log message ***
This commit is contained in:
parent
2601d57e47
commit
6b7695e0f9
|
@ -211,7 +211,7 @@ public class Keyboard {
|
|||
if (Modifier.isStatic(field[i].getModifiers())
|
||||
&& Modifier.isPublic(field[i].getModifiers())
|
||||
&& Modifier.isFinal(field[i].getModifiers())
|
||||
&& field[i].getType() == int.class
|
||||
&& field[i].getType().equals(int.class)
|
||||
&& field[i].getName().startsWith("KEY_")) {
|
||||
|
||||
int key = field[i].getInt(null);
|
||||
|
|
|
@ -56,14 +56,16 @@ import java.util.HashSet;
|
|||
|
||||
public final class Display {
|
||||
|
||||
/** The current display mode, if created */
|
||||
private static DisplayMode current_mode;
|
||||
|
||||
static {
|
||||
Sys.initialize();
|
||||
current_mode = init();
|
||||
assert current_mode != null;
|
||||
System.out.println("Current mode "+current_mode);
|
||||
}
|
||||
|
||||
/** The current display mode, if created */
|
||||
private static DisplayMode current_mode;
|
||||
|
||||
/** Timer for sync() */
|
||||
private static long timeNow, timeThen;
|
||||
|
||||
|
@ -485,7 +487,6 @@ public final class Display {
|
|||
*
|
||||
* <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
|
||||
*
|
||||
* @param pixel_format Describes the minimum specifications the context must fulfill.
|
||||
* @throws LWJGLException
|
||||
*/
|
||||
public static void create() throws LWJGLException {
|
||||
|
@ -544,7 +545,7 @@ public final class Display {
|
|||
|
||||
private static void initControls() {
|
||||
// Automatically create mouse, keyboard and controller
|
||||
if (!Boolean.getBoolean("org.lwjgl.opengl.DIsplay.noinput")) {
|
||||
if (!Boolean.getBoolean("org.lwjgl.opengl.Display.noinput")) {
|
||||
if (!Mouse.isCreated() && !Boolean.getBoolean("org.lwjgl.opengl.Display.nomouse")) {
|
||||
try {
|
||||
Mouse.create();
|
||||
|
|
|
@ -190,7 +190,7 @@ public final class GLContext {
|
|||
// Grab all the public static booleans out of this class
|
||||
Field[] fields = GLContext.class.getDeclaredFields();
|
||||
for ( int i = 0; i < fields.length; i++ ) {
|
||||
if ( Modifier.isStatic(fields[i].getModifiers()) && fields[i].getType() == boolean.class ) {
|
||||
if ( Modifier.isStatic(fields[i].getModifiers()) && fields[i].getType().equals(boolean.class) ) {
|
||||
// reset fields
|
||||
try {
|
||||
fields[i].setBoolean(GLContext.class, exts.contains(fields[i].getName()));
|
||||
|
|
|
@ -32,12 +32,12 @@
|
|||
package org.lwjgl.util;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
|
||||
import org.lwjgl.opengl.DisplayMode;
|
||||
import org.lwjgl.Sys;
|
||||
import org.lwjgl.opengl.DisplayMode;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
|
@ -150,12 +150,12 @@ public final class Display {
|
|||
preferred[i] = Integer.parseInt(param[i].substring(idx + 1, param[i].length()));
|
||||
usePreferred[i] = true;
|
||||
param[i] = param[i].substring(0, idx);
|
||||
field[i] = DisplayMode.class.getField(param[i]);
|
||||
field[i] = DisplayMode.class.getDeclaredField(param[i]);
|
||||
} else if (param[i].charAt(0) == '-') {
|
||||
field[i] = DisplayMode.class.getField(param[i].substring(1));
|
||||
field[i] = DisplayMode.class.getDeclaredField(param[i].substring(1));
|
||||
order[i] = -1;
|
||||
} else {
|
||||
field[i] = DisplayMode.class.getField(param[i]);
|
||||
field[i] = DisplayMode.class.getDeclaredField(param[i]);
|
||||
order[i] = 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue