Win32: Don't accumulate scroll wheel deltas if Dinput is grabbed

This commit is contained in:
Elias Naur 2006-01-17 07:18:02 +00:00
parent 53ca29e9f7
commit 00292ddf75
1 changed files with 1 additions and 1 deletions

View File

@ -500,13 +500,13 @@ static void UpdateMouseFields(JNIEnv *env, jobject coord_buffer_obj, jobject but
buttons_buffer[j] = diMouseState.rgbButtons[j] != 0 ? JNI_TRUE : JNI_FALSE;
} else {
coords[2] = accum_dwheel;
accum_dwheel = 0;
num_buttons = mButtoncount;
if (num_buttons > BUTTON_STATES_SIZE)
num_buttons = BUTTON_STATES_SIZE;
for (j = 0; j < num_buttons; j++)
buttons_buffer[j] = win32_message_button_states[j];
}
accum_dwheel = 0;
if (mouse_grabbed) {
coords[0] = diMouseState.lX;
coords[1] = -diMouseState.lY;