assert that Direct Input has been created

This commit is contained in:
Brian Matzon 2004-01-12 16:28:51 +00:00
parent 6403da22e0
commit 9dd52c6559
1 changed files with 6 additions and 0 deletions

View File

@ -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);