assertion on Window.isCreated

This commit is contained in:
Brian Matzon 2004-02-05 16:33:31 +00:00
parent 2124b34f59
commit 3cdd9516f3
3 changed files with 9 additions and 0 deletions

View File

@ -36,6 +36,7 @@ import java.util.HashMap;
import java.util.Map;
import org.lwjgl.Sys;
import org.lwjgl.opengl.Window;
/**
* $Id$
@ -163,6 +164,9 @@ public class Controller {
* @throws Exception if the controller could not be created for any reason
*/
public static void create() throws Exception {
assert Window.isCreated() : "Window must be created prior to creating controller";
if (!initialized) {
initialize();
}

View File

@ -40,6 +40,7 @@ import java.util.HashMap;
import java.util.Map;
import org.lwjgl.Sys;
import org.lwjgl.opengl.Window;
/**
* $Id$
@ -282,6 +283,7 @@ public class Keyboard {
* @throws Exception if the keyboard could not be created for any reason
*/
public static void create() throws Exception {
assert Window.isCreated() : "Window must be created prior to creating keyboard";
if (!initialized)
initialize();
if (created)

View File

@ -234,6 +234,9 @@ public class Mouse {
* @throws Exception if the mouse could not be created for any reason
*/
public static void create() throws Exception {
assert Window.isCreated() : "Window must be created prior to creating mouse";
if (!initialized) {
initialize();
}