mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Minor button fixes
svn path=/trunk/; revision=4281
This commit is contained in:
parent
f92f7ff968
commit
b0e9fcf187
2 changed files with 7 additions and 7 deletions
|
@ -81,9 +81,9 @@ ps2_mouse_handler(PKINTERRUPT Interrupt, PVOID ServiceContext)
|
||||||
mouse_buffer_position = 0;
|
mouse_buffer_position = 0;
|
||||||
|
|
||||||
/* Determine the current state of the buttons */
|
/* Determine the current state of the buttons */
|
||||||
Input->RawButtons = (mouse_buffer[0] & 1) * GPM_B_LEFT +
|
Input->RawButtons = (mouse_buffer[0] & 1) /* * GPM_B_LEFT */ +
|
||||||
(mouse_buffer[0] & 2) * GPM_B_RIGHT +
|
(mouse_buffer[0] & 2) /* * GPM_B_RIGHT */ +
|
||||||
(mouse_buffer[0] & 4) * GPM_B_MIDDLE;
|
(mouse_buffer[0] & 4) /* * GPM_B_MIDDLE */;
|
||||||
|
|
||||||
/* Determine ButtonFlags */
|
/* Determine ButtonFlags */
|
||||||
Input->ButtonFlags = 0;
|
Input->ButtonFlags = 0;
|
||||||
|
@ -116,7 +116,7 @@ ps2_mouse_handler(PKINTERRUPT Interrupt, PVOID ServiceContext)
|
||||||
Input->ButtonFlags |= MOUSE_BUTTON_3_DOWN;
|
Input->ButtonFlags |= MOUSE_BUTTON_3_DOWN;
|
||||||
} else {
|
} else {
|
||||||
Input->ButtonFlags |= MOUSE_BUTTON_3_UP;
|
Input->ButtonFlags |= MOUSE_BUTTON_3_UP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Some PS/2 mice send reports with negative bit set in data[0] and zero for
|
/* Some PS/2 mice send reports with negative bit set in data[0] and zero for
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
CONTROLLER_MODE_KEYBOARD_INTERRUPT)
|
CONTROLLER_MODE_KEYBOARD_INTERRUPT)
|
||||||
|
|
||||||
// Used with mouse buttons
|
// Used with mouse buttons
|
||||||
#define GPM_B_LEFT 4
|
#define GPM_B_LEFT 1
|
||||||
#define GPM_B_MIDDLE 2
|
#define GPM_B_RIGHT 2
|
||||||
#define GPM_B_RIGHT 1
|
#define GPM_B_MIDDLE 4
|
||||||
|
|
||||||
// Some aux operations take long time
|
// Some aux operations take long time
|
||||||
#define MAX_RETRIES 60
|
#define MAX_RETRIES 60
|
||||||
|
|
Loading…
Reference in a new issue