Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e850b4f1
Commit
e850b4f1
authored
Apr 24, 2008
by
Vitaliy Margolen
Committed by
Alexandre Julliard
May 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Convert keyboard buffer from internal data format to user data format.
parent
e66b15c2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
keyboard.c
dlls/dinput/keyboard.c
+2
-2
keyboard.c
dlls/dinput/tests/keyboard.c
+0
-3
No files found.
dlls/dinput/keyboard.c
View file @
e850b4f1
...
...
@@ -270,7 +270,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
);
...
...
@@ -283,7 +283,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
}
}
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
;
...
...
dlls/dinput/tests/keyboard.c
View file @
e850b4f1
...
...
@@ -116,13 +116,10 @@ static void acquire_tests(LPDIRECTINPUT pDI, HWND hwnd)
ok
(
SUCCEEDED
(
hr
),
"IDirectInputDevice_SetDataFormat() failed: %s
\n
"
,
DXGetErrorString8
(
hr
));
hr
=
IDirectInputDevice_Acquire
(
pKeyboard
);
ok
(
SUCCEEDED
(
hr
),
"IDirectInputDevice_Acquire() failed: %s
\n
"
,
DXGetErrorString8
(
hr
));
todo_wine
{
hr
=
IDirectInputDevice_GetDeviceState
(
pKeyboard
,
sizeof
(
custom_state
),
custom_state
);
ok
(
SUCCEEDED
(
hr
),
"IDirectInputDevice_GetDeviceState(4,) failed: %s
\n
"
,
DXGetErrorString8
(
hr
));
hr
=
IDirectInputDevice_GetDeviceState
(
pKeyboard
,
sizeof
(
kbd_state
),
kbd_state
);
ok
(
hr
==
DIERR_INVALIDPARAM
,
"IDirectInputDevice_GetDeviceState(256,) should have failed: %s
\n
"
,
DXGetErrorString8
(
hr
));
}
if
(
pKeyboard
)
IUnknown_Release
(
pKeyboard
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment