fix: no longer fatal to not acquire input

This commit is contained in:
Brian Matzon 2003-03-01 21:39:31 +00:00
parent 451f237085
commit db7b3a9cf5
2 changed files with 6 additions and 5 deletions

View File

@ -117,8 +117,10 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Keyboard_nCreate
lpdiKeyboard->SetProperty(DIPROP_BUFFERSIZE, &dipropdw.diph);
HRESULT ret = lpdiKeyboard->Acquire();
if (ret != DI_OK && ret != S_FALSE) {
printf("Failed to acquire keyboard\n");
if(FAILED(ret)) {
#if _DEBUG
printf("Failed to acquire keyboard\n");
#endif
}
return JNI_TRUE;

View File

@ -136,10 +136,8 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_input_Mouse_nCreate(JNIEnv *env, jclas
hr = mDIDevice->Acquire();
if(FAILED(hr)) {
#if _DEBUG
printf("Acquire failed\n");
printf("Failed to acquire mouse\n");
#endif
ShutdownMouse();
return JNI_FALSE;
}
return mCreate_success;
@ -160,6 +158,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nDestroy(JNIEnv *env, jclass c
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_input_Mouse_nPoll(JNIEnv * env, jclass clazz) {
mDIDevice->Acquire();
UpdateMouseFields();
}