assert that Direct Input has been created
This commit is contained in:
parent
6403da22e0
commit
9dd52c6559
|
@ -108,6 +108,12 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_input_Mouse_nGetButtonCount(JNIEnv *, jcla
|
|||
JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nCreate(JNIEnv *env, jclass clazz) {
|
||||
HRESULT hr;
|
||||
|
||||
// assert that Direct Input has been created
|
||||
if(lpdi == NULL) {
|
||||
throwException(env, "Please create the window before initializing input devices\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ShowCursor(FALSE);
|
||||
CacheMouseFields(env, clazz);
|
||||
|
||||
|
|
Loading…
Reference in New Issue