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
d939367a
Commit
d939367a
authored
Sep 14, 2008
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Sep 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Implement DIPROP_KEYNAME property for keyboard device.
Based on patch from Sergey Khodych.
parent
5085d4cd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
keyboard.c
dlls/dinput/keyboard.c
+38
-2
dinput.h
include/dinput.h
+7
-0
No files found.
dlls/dinput/keyboard.c
View file @
d939367a
...
...
@@ -430,6 +430,42 @@ static HRESULT WINAPI SysKeyboardWImpl_GetDeviceInfo(LPDIRECTINPUTDEVICE8W iface
return
DI_OK
;
}
/******************************************************************************
* GetProperty : Retrieves information about the input device.
*/
static
HRESULT
WINAPI
SysKeyboardAImpl_GetProperty
(
LPDIRECTINPUTDEVICE8A
iface
,
REFGUID
rguid
,
LPDIPROPHEADER
pdiph
)
{
TRACE
(
"(%p) %s,%p
\n
"
,
iface
,
debugstr_guid
(
rguid
),
pdiph
);
_dump_DIPROPHEADER
(
pdiph
);
if
(
HIWORD
(
rguid
))
return
DI_OK
;
switch
(
LOWORD
(
rguid
))
{
case
(
DWORD
)
DIPROP_KEYNAME
:
{
HRESULT
hr
;
LPDIPROPSTRING
ps
=
(
LPDIPROPSTRING
)
pdiph
;
DIDEVICEOBJECTINSTANCEW
didoi
;
if
(
pdiph
->
dwSize
!=
sizeof
(
DIPROPSTRING
))
return
DIERR_INVALIDPARAM
;
didoi
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
);
hr
=
SysKeyboardWImpl_GetObjectInfo
((
LPDIRECTINPUTDEVICE8W
)
iface
,
&
didoi
,
ps
->
diph
.
dwObj
,
ps
->
diph
.
dwHow
);
if
(
hr
==
DI_OK
)
memcpy
(
ps
->
wsz
,
didoi
.
tszName
,
sizeof
(
ps
->
wsz
));
return
hr
;
}
default:
return
IDirectInputDevice2AImpl_GetProperty
(
iface
,
rguid
,
pdiph
);
}
return
DI_OK
;
}
static
const
IDirectInputDevice8AVtbl
SysKeyboardAvt
=
{
IDirectInputDevice2AImpl_QueryInterface
,
...
...
@@ -437,7 +473,7 @@ static const IDirectInputDevice8AVtbl SysKeyboardAvt =
IDirectInputDevice2AImpl_Release
,
SysKeyboardAImpl_GetCapabilities
,
IDirectInputDevice2AImpl_EnumObjects
,
IDirectInputDevice2
AImpl_GetProperty
,
SysKeyboard
AImpl_GetProperty
,
IDirectInputDevice2AImpl_SetProperty
,
IDirectInputDevice2AImpl_Acquire
,
IDirectInputDevice2AImpl_Unacquire
,
...
...
@@ -479,7 +515,7 @@ static const IDirectInputDevice8WVtbl SysKeyboardWvt =
XCAST
(
Release
)
IDirectInputDevice2AImpl_Release
,
XCAST
(
GetCapabilities
)
SysKeyboardAImpl_GetCapabilities
,
IDirectInputDevice2WImpl_EnumObjects
,
XCAST
(
GetProperty
)
IDirectInputDevice2
AImpl_GetProperty
,
XCAST
(
GetProperty
)
SysKeyboard
AImpl_GetProperty
,
XCAST
(
SetProperty
)
IDirectInputDevice2AImpl_SetProperty
,
XCAST
(
Acquire
)
IDirectInputDevice2AImpl_Acquire
,
XCAST
(
Unacquire
)
IDirectInputDevice2AImpl_Unacquire
,
...
...
include/dinput.h
View file @
d939367a
...
...
@@ -725,6 +725,12 @@ typedef struct DIPROPGUIDANDPATH {
}
DIPROPGUIDANDPATH
,
*
LPDIPROPGUIDANDPATH
;
typedef
const
DIPROPGUIDANDPATH
*
LPCDIPROPGUIDANDPATH
;
typedef
struct
DIPROPSTRING
{
DIPROPHEADER
diph
;
WCHAR
wsz
[
MAX_PATH
];
}
DIPROPSTRING
,
*
LPDIPROPSTRING
;
typedef
const
DIPROPSTRING
*
LPCDIPROPSTRING
;
/* special property GUIDs */
#ifdef __cplusplus
#define MAKEDIPROP(prop) (*(const GUID *)(prop))
...
...
@@ -755,6 +761,7 @@ typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
#define DIPROP_CALIBRATION MAKEDIPROP(11)
#define DIPROP_GUIDANDPATH MAKEDIPROP(12)
#define DIPROP_KEYNAME MAKEDIPROP(20)
typedef
struct
DIDEVCAPS_DX3
{
DWORD
dwSize
;
...
...
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