From 9b8394accc2aef9d81849ba72b24332f3837a4cc Mon Sep 17 00:00:00 2001 From: Sergey Khodych Date: Thu, 10 Apr 2008 00:57:49 +0300 Subject: Convert buffer from internal data format to user data format --- dlls/dinput/keyboard.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index 87837ff..25fae50 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -268,7 +268,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState( if (!This->base.acquired) return DIERR_NOTACQUIRED; - if (len != WINE_DINPUT_KEYBOARD_MAX_KEYS) + if (len != This->base.data_format.user_df->dwDataSize ) return DIERR_INVALIDPARAM; EnterCriticalSection(&This->base.crit); @@ -280,8 +280,8 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState( TRACE(" - %02X: %02x\n", i, This->DInputKeyState[i]); } } - - memcpy(ptr, This->DInputKeyState, WINE_DINPUT_KEYBOARD_MAX_KEYS); + + fill_DataFormat(ptr, This->DInputKeyState, &This->base.data_format); LeaveCriticalSection(&This->base.crit); return DI_OK; -- 1.5.3.3