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:
parent
05111c300f
commit
7c34e2cddb
|
@ -506,6 +506,9 @@ static void UpdateMouseFields(JNIEnv *env, jobject coord_buffer_obj, jobject but
|
||||||
}
|
}
|
||||||
for (j = 0; j < num_buttons; j++) {
|
for (j = 0; j < num_buttons; j++) {
|
||||||
buttons_buffer[j] = diMouseState.rgbButtons[j] != 0 ? JNI_TRUE : JNI_FALSE;
|
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 {
|
} else {
|
||||||
coords[2] = accum_dwheel;
|
coords[2] = accum_dwheel;
|
||||||
|
|
Loading…
Reference in New Issue