mirror of
https://github.com/reactos/reactos.git
synced 2024-07-13 16:15:05 +00:00
optimize hide curs lite. so it does not tryung update the underlying surface hold time. and do not save the underlying surface in show when it is hide. all these save alot of cycles and winquake are bit faster.
svn path=/trunk/; revision=20514
This commit is contained in:
parent
76f75c9351
commit
69288462ca
|
@ -423,6 +423,7 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
|
|||
DWORD dwCoop;
|
||||
static long last_event = 0;
|
||||
int wdata;
|
||||
long lasttime = 0;
|
||||
|
||||
if (code != HC_ACTION) return CallNextHookEx( This->hook, code, wparam, lparam );
|
||||
|
||||
|
@ -434,10 +435,19 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
|
|||
* the warps happen. But if it involves a mouse button event we
|
||||
* allow it since we don't want to lose the clicks.
|
||||
*/
|
||||
#ifndef __REACTOS__
|
||||
if (((GetCurrentTime() - last_event) < 10)
|
||||
&& wparam == WM_MOUSEMOVE)
|
||||
goto end;
|
||||
else last_event = GetCurrentTime();
|
||||
#else
|
||||
lasttime = GetCurrentTime() - last_event;
|
||||
|
||||
if ((lasttime) < 1)
|
||||
goto end;
|
||||
else if ((lasttime) >= 10)
|
||||
last_event = GetCurrentTime();
|
||||
#endif
|
||||
|
||||
/* Mouse moved -> send event if asked */
|
||||
if (This->hEvent)
|
||||
|
|
Loading…
Reference in a new issue