Commit 7ea3a29e authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Handle 'not acquired' error messages on keyboard GetDeviceData.

parent 60a583d6
......@@ -78,6 +78,8 @@ HHOOK keyboard_hook;
LRESULT CALLBACK KeyboardCallback( int code, WPARAM wparam, LPARAM lparam )
{
TRACE("(%d,%d,%ld)\n", code, wparam, lparam);
if (code == HC_ACTION)
{
BYTE dik_code;
......@@ -112,6 +114,9 @@ LRESULT CALLBACK KeyboardCallback( int code, WPARAM wparam, LPARAM lparam )
current->buffer[n].dwTimeStamp = timestamp;
current->buffer[n].dwSequence = current->dinput->evsequence++;
TRACE("Adding event at offset %d : %ld - %ld - %ld - %ld\n", n,
current->buffer[n].dwOfs, current->buffer[n].dwData, current->buffer[n].dwTimeStamp, current->buffer[n].dwSequence);
if (current->count == current->buffersize)
{
current->start++;
......@@ -246,6 +251,9 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
TRACE("(this=%p,%ld,%p,%p(%ld)),0x%08lx)\n",
This,dodsize,dod,entries,entries?*entries:0,flags);
if (This->acquired == 0)
return DIERR_NOTACQUIRED;
if (This->buffer == NULL)
return DIERR_NOTBUFFERED;
......@@ -285,6 +293,8 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
LeaveCriticalSection(&(This->crit));
TRACE("Returning %ld events queued\n", *entries);
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment