Encapsulated LIBRARY_NAME

This commit is contained in:
Caspian Rychlik-Prince 2002-08-19 14:01:23 +00:00
parent c6c26e568d
commit 72fedde744
10 changed files with 15 additions and 16 deletions

View File

@ -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? */

View File

@ -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.

View File

@ -103,7 +103,7 @@ public class GamePad {
* Static initialization
*/
private static void initialize() {
System.loadLibrary(Sys.LIBRARY_NAME);
System.loadLibrary(Sys.getLibraryName());
initIDs();
}

View File

@ -81,7 +81,7 @@ public class Joystick {
* Static initialization
*/
private static void initialize() {
System.loadLibrary(Sys.LIBRARY_NAME);
System.loadLibrary(Sys.getLibraryName());
initIDs();
}

View File

@ -211,7 +211,7 @@ public class Keyboard {
* Static initialization
*/
private static void initialize() {
System.loadLibrary(Sys.LIBRARY_NAME);
System.loadLibrary(Sys.getLibraryName());
initIDs();
}

View File

@ -79,7 +79,7 @@ public class Mouse {
* Static initialization
*/
private static void initialize() {
System.loadLibrary(Sys.LIBRARY_NAME);
System.loadLibrary(Sys.getLibraryName());
initIDs();
}

View File

@ -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 */

View File

@ -44,10 +44,6 @@ import org.lwjgl.Sys;
*/
public class CoreGL extends BaseGL implements CoreGLConstants {
static {
System.loadLibrary(Sys.LIBRARY_NAME);
}
/**
* Constructor for CoreGL.
*/

View File

@ -1443,10 +1443,6 @@ public class GL extends CoreGL implements GLConstants {
int outZ,
int outW);
static {
System.loadLibrary(Sys.LIBRARY_NAME);
}
/*
* Available extensions
*/

View File

@ -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 */