mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:52:56 +00:00
getmousedevice buffer
UT2004 the mouse are less choopy on my computer now. and small bug fix. it maby still exists some bug left. svn path=/trunk/; revision=13988
This commit is contained in:
parent
bc1cb8bf6e
commit
0bf2971d1a
1 changed files with 12 additions and 5 deletions
|
@ -869,6 +869,7 @@ static POINT save_point;
|
||||||
static int save_b[5];
|
static int save_b[5];
|
||||||
static int b[5];
|
static int b[5];
|
||||||
static POINT point;
|
static POINT point;
|
||||||
|
int calc;
|
||||||
int count_button;
|
int count_button;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -917,14 +918,17 @@ GetCursorPos( &point );
|
||||||
time = GetTickCount();
|
time = GetTickCount();
|
||||||
if (*entries == 0) return DIERR_INVALIDPARAM;
|
if (*entries == 0) return DIERR_INVALIDPARAM;
|
||||||
|
|
||||||
last_event++;
|
|
||||||
|
|
||||||
for (count=0;count<*entries;count++) {
|
for (count=0;count<*entries;count++) {
|
||||||
|
|
||||||
if (save_point.x != point.x) {
|
if (save_point.x != point.x) {
|
||||||
dod[count_ent].dwOfs = DIMOFS_X;
|
dod[count].dwOfs = DIMOFS_X;
|
||||||
dod[count_ent].dwData = point.x - save_point.x;
|
calc = point.x - save_point.x;
|
||||||
|
if (calc >2) dod[count].dwData = 2;
|
||||||
|
else if (calc < -2) dod[count].dwData = -2;
|
||||||
|
else dod[count].dwData = calc;
|
||||||
|
|
||||||
dod[count].dwTimeStamp = time +1;
|
dod[count].dwTimeStamp = time +1;
|
||||||
dod[count].dwSequence = last_event++;
|
dod[count].dwSequence = last_event++;
|
||||||
count_ent++;
|
count_ent++;
|
||||||
|
@ -933,7 +937,10 @@ GetCursorPos( &point );
|
||||||
|
|
||||||
if (save_point.y != point.y) {
|
if (save_point.y != point.y) {
|
||||||
dod[count].dwOfs = DIMOFS_Y;
|
dod[count].dwOfs = DIMOFS_Y;
|
||||||
dod[count].dwData = point.y - save_point.y;
|
calc = point.y - save_point.y;
|
||||||
|
if (calc >2) dod[count].dwData = 2;
|
||||||
|
else if (calc < -2) dod[count].dwData = -2;
|
||||||
|
else dod[count].dwData = calc;
|
||||||
|
|
||||||
dod[count].dwTimeStamp = time +1;
|
dod[count].dwTimeStamp = time +1;
|
||||||
dod[count].dwSequence = last_event++;
|
dod[count].dwSequence = last_event++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue