assertion on Window.isCreated
This commit is contained in:
parent
2124b34f59
commit
3cdd9516f3
|
@ -36,6 +36,7 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.lwjgl.Sys;
|
import org.lwjgl.Sys;
|
||||||
|
import org.lwjgl.opengl.Window;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* $Id$
|
* $Id$
|
||||||
|
@ -163,6 +164,9 @@ public class Controller {
|
||||||
* @throws Exception if the controller could not be created for any reason
|
* @throws Exception if the controller could not be created for any reason
|
||||||
*/
|
*/
|
||||||
public static void create() throws Exception {
|
public static void create() throws Exception {
|
||||||
|
|
||||||
|
assert Window.isCreated() : "Window must be created prior to creating controller";
|
||||||
|
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.lwjgl.Sys;
|
import org.lwjgl.Sys;
|
||||||
|
import org.lwjgl.opengl.Window;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* $Id$
|
* $Id$
|
||||||
|
@ -282,6 +283,7 @@ public class Keyboard {
|
||||||
* @throws Exception if the keyboard could not be created for any reason
|
* @throws Exception if the keyboard could not be created for any reason
|
||||||
*/
|
*/
|
||||||
public static void create() throws Exception {
|
public static void create() throws Exception {
|
||||||
|
assert Window.isCreated() : "Window must be created prior to creating keyboard";
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
initialize();
|
initialize();
|
||||||
if (created)
|
if (created)
|
||||||
|
|
|
@ -234,6 +234,9 @@ public class Mouse {
|
||||||
* @throws Exception if the mouse could not be created for any reason
|
* @throws Exception if the mouse could not be created for any reason
|
||||||
*/
|
*/
|
||||||
public static void create() throws Exception {
|
public static void create() throws Exception {
|
||||||
|
|
||||||
|
assert Window.isCreated() : "Window must be created prior to creating mouse";
|
||||||
|
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue