mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +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;
|
||||
|
||||
/* Determine the current state of the buttons */
|
||||
Input->RawButtons = (mouse_buffer[0] & 1) * GPM_B_LEFT +
|
||||
(mouse_buffer[0] & 2) * GPM_B_RIGHT +
|
||||
(mouse_buffer[0] & 4) * GPM_B_MIDDLE;
|
||||
Input->RawButtons = (mouse_buffer[0] & 1) /* * GPM_B_LEFT */ +
|
||||
(mouse_buffer[0] & 2) /* * GPM_B_RIGHT */ +
|
||||
(mouse_buffer[0] & 4) /* * GPM_B_MIDDLE */;
|
||||
|
||||
/* Determine ButtonFlags */
|
||||
Input->ButtonFlags = 0;
|
||||
|
@ -116,7 +116,7 @@ ps2_mouse_handler(PKINTERRUPT Interrupt, PVOID ServiceContext)
|
|||
Input->ButtonFlags |= MOUSE_BUTTON_3_DOWN;
|
||||
} else {
|
||||
Input->ButtonFlags |= MOUSE_BUTTON_3_UP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Some PS/2 mice send reports with negative bit set in data[0] and zero for
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
CONTROLLER_MODE_KEYBOARD_INTERRUPT)
|
||||
|
||||
// Used with mouse buttons
|
||||
#define GPM_B_LEFT 4
|
||||
#define GPM_B_MIDDLE 2
|
||||
#define GPM_B_RIGHT 1
|
||||
#define GPM_B_LEFT 1
|
||||
#define GPM_B_RIGHT 2
|
||||
#define GPM_B_MIDDLE 4
|
||||
|
||||
// Some aux operations take long time
|
||||
#define MAX_RETRIES 60
|
||||
|
|
Loading…
Reference in a new issue