Moved Win32 specific code to win32 specific class(!)

This commit is contained in:
Elias Naur 2005-03-09 08:37:06 +00:00
parent 7d7ec34082
commit ed325d0c95
2 changed files with 4 additions and 1 deletions

View File

@ -65,7 +65,6 @@ public class AWTGLCanvas extends Canvas implements Drawable, ComponentListener,
if (OS_NAME.startsWith("Linux")) {
class_name = "org.lwjgl.opengl.LinuxCanvasImplementation";
} else if (OS_NAME.startsWith("Windows")) {
System.loadLibrary("jawt");
class_name = "org.lwjgl.opengl.Win32CanvasImplementation";
} else if (OS_NAME.startsWith("Mac")) {
class_name = "org.lwjgl.opengl.MacOSXCanvasImplementation";

View File

@ -49,6 +49,10 @@ import java.lang.reflect.Method;
* @version $Revision$
*/
final class Win32CanvasImplementation implements AWTCanvasImplementation {
static {
System.loadLibrary("jawt");
}
public PeerInfo createPeerInfo(AWTGLCanvas canvas, PixelFormat pixel_format) throws LWJGLException {
return new Win32AWTGLCanvasPeerInfo(canvas, pixel_format);
}