dinput: Set event from queue_event, simplifying code a bit.

This commit is contained in:
Vitaliy Margolen 2007-01-07 00:14:56 -07:00 committed by Alexandre Julliard
parent 8e8b4f03b0
commit 4b33fd691a
3 changed files with 2 additions and 5 deletions

View File

@ -591,6 +591,8 @@ void queue_event(LPDIRECTINPUTDEVICE8A iface, int ofs, DWORD data, DWORD time, D
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);
}
/******************************************************************************

View File

@ -89,8 +89,6 @@ static LRESULT CALLBACK KeyboardCallback( int code, WPARAM wparam, LPARAM lparam
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);
}

View File

@ -376,9 +376,6 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
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 */