Module: wine Branch: master Commit: 4b33fd691a5028a62d1d5e077bb7224e9d5eec6a URL: http://source.winehq.org/git/wine.git/?a=commit;h=4b33fd691a5028a62d1d5e077b...
Author: Vitaliy Margolen wine-patches@kievinfo.com Date: Sun Jan 7 00:14:56 2007 -0700
dinput: Set event from queue_event, simplifying code a bit.
---
dlls/dinput/device.c | 2 ++ dlls/dinput/keyboard.c | 2 -- dlls/dinput/mouse.c | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index d1efa6d..34a721d 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -591,6 +591,8 @@ void queue_event(LPDIRECTINPUTDEVICE8A i This->data_queue[This->queue_head].dwTimeStamp = time; This->data_queue[This->queue_head].dwSequence = seq; This->queue_head = next_pos; + /* Send event if asked */ + if (This->hEvent) SetEvent(This->hEvent); }
/****************************************************************************** diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index 8ca463d..08c6cd8 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -89,8 +89,6 @@ static LRESULT CALLBACK KeyboardCallback EnterCriticalSection(&This->base.crit); queue_event((LPDIRECTINPUTDEVICE8A)This, dik_code, new_diks, hook->time, This->dinput->evsequence++); LeaveCriticalSection(&This->base.crit); - - if (This->base.hEvent) SetEvent(This->base.hEvent);
return CallNextHookEx(0, code, wparam, lparam); } diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 2d2ed44..dc330d9 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -376,9 +376,6 @@ static LRESULT CALLBACK dinput_mouse_hoo queue_event((LPDIRECTINPUTDEVICE8A)This, id_to_offset(&This->base.data_format, inst_id), wdata, hook->time, This->dinput->evsequence++);
- /* Mouse moved -> send event if asked */ - if (This->base.hEvent) SetEvent(This->base.hEvent); - LeaveCriticalSection(&This->base.crit);
/* Ignore message */