Only initialize Controller on win32

This commit is contained in:
Elias Naur 2004-11-03 13:58:06 +00:00
parent 742559fe20
commit 7ecf2516fb
1 changed files with 3 additions and 1 deletions

View File

@ -107,6 +107,8 @@ public final class Display {
class_name = "org.lwjgl.opengl.LinuxDisplay";
} else if (os_name.startsWith("Windows")) {
class_name = "org.lwjgl.opengl.Win32Display";
} else if (os_name.startsWith("Mac")) {
class_name = "org.lwjgl.opengl.MacOSXDisplay";
} else
throw new IllegalStateException("The platform " + os_name + " is not supported");
try {
@ -577,7 +579,7 @@ public final class Display {
}
}
}
if (!Controller.isCreated() && !Boolean.getBoolean("org.lwjgl.opengl.Display.nocontroller")) {
if (System.getProperty("os.name").startsWith("Win") && !Controller.isCreated() && !Boolean.getBoolean("org.lwjgl.opengl.Display.nocontroller")) {
try {
Controller.create();
} catch (LWJGLException e) {