Reduced Sys.debug from bool -> int
This commit is contained in:
parent
97cb16eb74
commit
615bdfb113
|
@ -82,14 +82,14 @@ public final class Sys {
|
||||||
/**
|
/**
|
||||||
* Debug flag.
|
* Debug flag.
|
||||||
*/
|
*/
|
||||||
public static final boolean debug;
|
public static final boolean DEBUG;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
String debug_level_prop = System.getProperty("org.lwjgl.Sys.debug", "false");
|
String debug_level_prop = System.getProperty("org.lwjgl.Sys.debug", "false");
|
||||||
if (debug_level_prop.equals("true"))
|
if (debug_level_prop.equals("true"))
|
||||||
debug = true;
|
DEBUG = true;
|
||||||
else
|
else
|
||||||
debug = false;
|
DEBUG = false;
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,23 +111,16 @@ public final class Sys {
|
||||||
* is true.
|
* is true.
|
||||||
*/
|
*/
|
||||||
public static void log(String msg) {
|
public static void log(String msg) {
|
||||||
if (isDebugEnabled())
|
if (Sys.DEBUG)
|
||||||
System.err.println(msg);
|
System.err.println(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return true if debugging has been enabled
|
|
||||||
*/
|
|
||||||
public static boolean isDebugEnabled() {
|
|
||||||
return debug;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialization.
|
* Initialization.
|
||||||
*/
|
*/
|
||||||
private static void initialize() {
|
private static void initialize() {
|
||||||
System.loadLibrary(LIBRARY_NAME);
|
System.loadLibrary(LIBRARY_NAME);
|
||||||
setDebug(debug);
|
setDebug(DEBUG);
|
||||||
setTime(0);
|
setTime(0);
|
||||||
|
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||||
|
|
Loading…
Reference in New Issue