Win32: Track directinput mouse buttons in the windows message state array. This should avoid some problems when switching from grabbed to non-grabbed

This commit is contained in:
Elias Naur 2006-05-30 08:48:16 +00:00
parent 05111c300f
commit 7c34e2cddb
1 changed files with 3 additions and 0 deletions

View File

@ -506,6 +506,9 @@ static void UpdateMouseFields(JNIEnv *env, jobject coord_buffer_obj, jobject but
}
for (j = 0; j < num_buttons; j++) {
buttons_buffer[j] = diMouseState.rgbButtons[j] != 0 ? JNI_TRUE : JNI_FALSE;
// track the button state in the windows message buffer state array
// to get accurate button information when releasing a grab
win32_message_button_states[j] = buttons_buffer[j];
}
} else {
coords[2] = accum_dwheel;