Attempt fix for out of focus mouse bug in win32

This commit is contained in:
Elias Naur 2004-05-04 18:47:47 +00:00
parent cf1f74660c
commit 054e1f9f29
1 changed files with 4 additions and 1 deletions

View File

@ -469,9 +469,12 @@ static void UpdateMouseFields(JNIEnv *env, jclass clsMouse, jobject coord_buffer
// did the read fail because we lost input for some reason?
// if so, then attempt to reacquire.
if(hRes == DIERR_INPUTLOST || hRes == DIERR_NOTACQUIRED) {
mDIDevice->Acquire();
hRes = mDIDevice->Acquire();
if (hRes != DI_OK)
return;
} else {
printfDebug("Error getting mouse state: %d\n", hRes);
return;
}
}