Encapsulated LIBRARY_NAME
This commit is contained in:
parent
c6c26e568d
commit
72fedde744
|
@ -46,7 +46,7 @@ package org.lwjgl;
|
|||
public final class Display {
|
||||
|
||||
static {
|
||||
System.loadLibrary(Sys.LIBRARY_NAME);
|
||||
System.loadLibrary(Sys.getLibraryName());
|
||||
}
|
||||
|
||||
/** Has the display been created? */
|
||||
|
|
|
@ -79,7 +79,7 @@ public final class Sys {
|
|||
}
|
||||
|
||||
/** The native library name */
|
||||
public static String LIBRARY_NAME;
|
||||
private static String LIBRARY_NAME;
|
||||
|
||||
static {
|
||||
try {
|
||||
|
@ -91,6 +91,13 @@ public final class Sys {
|
|||
LIBRARY_NAME = "lwjgl_d";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the name of the native library to load
|
||||
*/
|
||||
public static String getLibraryName() {
|
||||
return LIBRARY_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* No constructor for Sys.
|
||||
|
|
|
@ -103,7 +103,7 @@ public class GamePad {
|
|||
* Static initialization
|
||||
*/
|
||||
private static void initialize() {
|
||||
System.loadLibrary(Sys.LIBRARY_NAME);
|
||||
System.loadLibrary(Sys.getLibraryName());
|
||||
initIDs();
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public class Joystick {
|
|||
* Static initialization
|
||||
*/
|
||||
private static void initialize() {
|
||||
System.loadLibrary(Sys.LIBRARY_NAME);
|
||||
System.loadLibrary(Sys.getLibraryName());
|
||||
initIDs();
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ public class Keyboard {
|
|||
* Static initialization
|
||||
*/
|
||||
private static void initialize() {
|
||||
System.loadLibrary(Sys.LIBRARY_NAME);
|
||||
System.loadLibrary(Sys.getLibraryName());
|
||||
initIDs();
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class Mouse {
|
|||
* Static initialization
|
||||
*/
|
||||
private static void initialize() {
|
||||
System.loadLibrary(Sys.LIBRARY_NAME);
|
||||
System.loadLibrary(Sys.getLibraryName());
|
||||
initIDs();
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ import org.lwjgl.Sys;
|
|||
abstract class BaseGL {
|
||||
|
||||
static {
|
||||
System.loadLibrary(Sys.LIBRARY_NAME);
|
||||
System.loadLibrary(Sys.getLibraryName());
|
||||
}
|
||||
|
||||
/** The current rendering context */
|
||||
|
|
|
@ -44,10 +44,6 @@ import org.lwjgl.Sys;
|
|||
*/
|
||||
public class CoreGL extends BaseGL implements CoreGLConstants {
|
||||
|
||||
static {
|
||||
System.loadLibrary(Sys.LIBRARY_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for CoreGL.
|
||||
*/
|
||||
|
|
|
@ -1443,10 +1443,6 @@ public class GL extends CoreGL implements GLConstants {
|
|||
int outZ,
|
||||
int outW);
|
||||
|
||||
static {
|
||||
System.loadLibrary(Sys.LIBRARY_NAME);
|
||||
}
|
||||
|
||||
/*
|
||||
* Available extensions
|
||||
*/
|
||||
|
|
|
@ -45,7 +45,7 @@ import org.lwjgl.Sys;
|
|||
public class GLU implements GLUConstants {
|
||||
|
||||
static {
|
||||
System.loadLibrary(Sys.LIBRARY_NAME);
|
||||
System.loadLibrary(Sys.getLibraryName());
|
||||
}
|
||||
|
||||
/** Handle to GL */
|
||||
|
|
Loading…
Reference in New Issue