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
20ba784a
Commit
20ba784a
authored
Jan 03, 2007
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Move keyboard to using new GetObjectInfo.
parent
0edc6e26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
44 deletions
+14
-44
keyboard.c
dlls/dinput/keyboard.c
+14
-44
No files found.
dlls/dinput/keyboard.c
View file @
20ba784a
...
...
@@ -415,33 +415,18 @@ SysKeyboardAImpl_GetObjectInfo(
DWORD
dwObj
,
DWORD
dwHow
)
{
SysKeyboardImpl
*
This
=
(
SysKeyboardImpl
*
)
iface
;
DIDEVICEOBJECTINSTANCEA
ddoi
;
DWORD
dwSize
=
pdidoi
->
dwSize
;
TRACE
(
"(this=%p,%p,%d,0x%08x)
\n
"
,
This
,
pdidoi
,
dwObj
,
dwHow
);
if
(
dwHow
==
DIPH_BYID
)
{
WARN
(
" querying by id not supported yet...
\n
"
);
return
DI_OK
;
}
HRESULT
res
;
memset
(
pdidoi
,
0
,
dwSize
);
memset
(
&
ddoi
,
0
,
sizeof
(
ddoi
))
;
res
=
IDirectInputDevice2AImpl_GetObjectInfo
(
iface
,
pdidoi
,
dwObj
,
dwHow
);
if
(
res
!=
DI_OK
)
return
res
;
ddoi
.
dwSize
=
dwSize
;
ddoi
.
guidType
=
GUID_Key
;
ddoi
.
dwOfs
=
dwObj
;
ddoi
.
dwType
=
DIDFT_MAKEINSTANCE
(
dwObj
)
|
DIDFT_BUTTON
;
if
(
!
GetKeyNameTextA
(((
dwObj
&
0x7f
)
<<
16
)
|
((
dwObj
&
0x80
)
<<
17
),
ddoi
.
tszName
,
sizeof
(
ddoi
.
tszName
)))
if
(
!
GetKeyNameTextA
((
DIDFT_GETINSTANCE
(
pdidoi
->
dwType
)
&
0x80
)
<<
17
|
(
DIDFT_GETINSTANCE
(
pdidoi
->
dwType
)
&
0x7f
)
<<
16
,
pdidoi
->
tszName
,
sizeof
(
pdidoi
->
tszName
)))
return
DIERR_OBJECTNOTFOUND
;
/* And return our just filled device object instance structure */
memcpy
(
pdidoi
,
&
ddoi
,
(
dwSize
<
sizeof
(
ddoi
)
?
dwSize
:
sizeof
(
ddoi
)));
_dump_OBJECTINSTANCEA
(
pdidoi
);
return
DI_OK
;
return
res
;
}
static
HRESULT
WINAPI
SysKeyboardWImpl_GetObjectInfo
(
LPDIRECTINPUTDEVICE8W
iface
,
...
...
@@ -449,33 +434,18 @@ static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface
DWORD
dwObj
,
DWORD
dwHow
)
{
SysKeyboardImpl
*
This
=
(
SysKeyboardImpl
*
)
iface
;
DIDEVICEOBJECTINSTANCEW
ddoi
;
DWORD
dwSize
=
pdidoi
->
dwSize
;
TRACE
(
"(this=%p,%p,%d,0x%08x)
\n
"
,
This
,
pdidoi
,
dwObj
,
dwHow
);
if
(
dwHow
==
DIPH_BYID
)
{
WARN
(
" querying by id not supported yet...
\n
"
);
return
DI_OK
;
}
HRESULT
res
;
memset
(
pdidoi
,
0
,
dwSize
);
memset
(
&
ddoi
,
0
,
sizeof
(
ddoi
))
;
res
=
IDirectInputDevice2WImpl_GetObjectInfo
(
iface
,
pdidoi
,
dwObj
,
dwHow
);
if
(
res
!=
DI_OK
)
return
res
;
ddoi
.
dwSize
=
dwSize
;
ddoi
.
guidType
=
GUID_Key
;
ddoi
.
dwOfs
=
dwObj
;
ddoi
.
dwType
=
DIDFT_MAKEINSTANCE
(
dwObj
)
|
DIDFT_BUTTON
;
if
(
!
GetKeyNameTextW
(((
dwObj
&
0x7f
)
<<
16
)
|
((
dwObj
&
0x80
)
<<
17
),
ddoi
.
tszName
,
sizeof
(
ddoi
.
tszName
)))
if
(
!
GetKeyNameTextW
((
DIDFT_GETINSTANCE
(
pdidoi
->
dwType
)
&
0x80
)
<<
17
|
(
DIDFT_GETINSTANCE
(
pdidoi
->
dwType
)
&
0x7f
)
<<
16
,
pdidoi
->
tszName
,
sizeof
(
pdidoi
->
tszName
)))
return
DIERR_OBJECTNOTFOUND
;
/* And return our just filled device object instance structure */
memcpy
(
pdidoi
,
&
ddoi
,
(
dwSize
<
sizeof
(
ddoi
)
?
dwSize
:
sizeof
(
ddoi
)));
_dump_OBJECTINSTANCEW
(
pdidoi
);
return
DI_OK
;
return
res
;
}
/******************************************************************************
...
...
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