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
d14ad4ff
Commit
d14ad4ff
authored
Feb 12, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Feb 12, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented EnumObjects for the keyboard device.
parent
dff968b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
5 deletions
+40
-5
device.c
dlls/dinput/device.c
+2
-2
main.c
dlls/dinput/keyboard/main.c
+37
-3
main.c
dlls/dinput/mouse/main.c
+1
-0
No files found.
dlls/dinput/device.c
View file @
d14ad4ff
...
...
@@ -102,8 +102,8 @@ void _dump_DIPROPHEADER(DIPROPHEADER *diph) {
void
_dump_OBJECTINSTANCEA
(
DIDEVICEOBJECTINSTANCEA
*
ddoi
)
{
if
(
TRACE_ON
(
dinput
))
{
DPRINTF
(
" - enumerating :
0x%08lx
- %2ld - 0x%08lx - %s
\n
"
,
d
doi
->
guidType
.
Data1
,
ddoi
->
dwOfs
,
ddoi
->
dwType
,
ddoi
->
tszName
);
DPRINTF
(
" - enumerating :
%s
- %2ld - 0x%08lx - %s
\n
"
,
d
ebugstr_guid
(
&
ddoi
->
guidType
)
,
ddoi
->
dwOfs
,
ddoi
->
dwType
,
ddoi
->
tszName
);
}
}
...
...
dlls/dinput/keyboard/main.c
View file @
d14ad4ff
...
...
@@ -166,7 +166,7 @@ static SysKeyboardAImpl *alloc_device(REFGUID rguid, LPVOID kvt, IDirectInputAIm
EnterCriticalSection
(
&
keyboard_crit
);
if
(
!
keyboard_users
++
)
keyboard_hook
=
SetWindowsHookExW
(
WH_KEYBOARD_LL
,
KeyboardCallback
,
DINPUT_instance
,
0
);
keyboard_hook
=
SetWindowsHookExW
(
WH_KEYBOARD_LL
,
KeyboardCallback
,
DINPUT_instance
,
0
);
LeaveCriticalSection
(
&
keyboard_crit
);
return
newDevice
;
...
...
@@ -326,6 +326,40 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
return
ret
;
}
static
HRESULT
WINAPI
SysKeyboardAImpl_EnumObjects
(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIENUMDEVICEOBJECTSCALLBACKA
lpCallback
,
LPVOID
lpvRef
,
DWORD
dwFlags
)
{
ICOM_THIS
(
SysKeyboardAImpl
,
iface
);
DIDEVICEOBJECTINSTANCEA
ddoi
;
int
i
;
TRACE
(
"(this=%p,%p,%p,%08lx)
\n
"
,
This
,
lpCallback
,
lpvRef
,
dwFlags
);
if
(
TRACE_ON
(
dinput
))
{
DPRINTF
(
" - flags = "
);
_dump_EnumObjects_flags
(
dwFlags
);
DPRINTF
(
"
\n
"
);
}
/* Only the fields till dwFFMaxForce are relevant */
memset
(
&
ddoi
,
0
,
sizeof
(
ddoi
));
ddoi
.
dwSize
=
FIELD_OFFSET
(
DIDEVICEOBJECTINSTANCEA
,
dwFFMaxForce
);
for
(
i
=
0
;
i
<
256
;
i
++
)
{
/* Report 255 keys :-) */
ddoi
.
guidType
=
GUID_Key
;
ddoi
.
dwOfs
=
i
;
ddoi
.
dwType
=
DIDFT_MAKEINSTANCE
(
i
)
|
DIDFT_BUTTON
;
strcpy
(
ddoi
.
tszName
,
"a"
);
/* This should be better handled :-/ */
_dump_OBJECTINSTANCEA
(
&
ddoi
);
if
(
lpCallback
(
&
ddoi
,
lpvRef
)
!=
DIENUM_CONTINUE
)
return
DI_OK
;
}
return
DI_OK
;
}
static
HRESULT
WINAPI
SysKeyboardAImpl_Unacquire
(
LPDIRECTINPUTDEVICE8A
iface
);
static
HRESULT
WINAPI
SysKeyboardAImpl_Acquire
(
LPDIRECTINPUTDEVICE8A
iface
)
...
...
@@ -412,7 +446,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
lpDIDevCaps
->
dwFlags
=
DIDC_ATTACHED
;
lpDIDevCaps
->
dwDevType
=
DIDEVTYPE_KEYBOARD
;
lpDIDevCaps
->
dwAxes
=
0
;
lpDIDevCaps
->
dwButtons
=
0
;
lpDIDevCaps
->
dwButtons
=
256
;
lpDIDevCaps
->
dwPOVs
=
0
;
lpDIDevCaps
->
dwFFSamplePeriod
=
0
;
lpDIDevCaps
->
dwFFMinTimeResolution
=
0
;
...
...
@@ -434,7 +468,7 @@ static ICOM_VTABLE(IDirectInputDevice8A) SysKeyboardAvt =
IDirectInputDevice2AImpl_AddRef
,
SysKeyboardAImpl_Release
,
SysKeyboardAImpl_GetCapabilities
,
IDirectInputDevice2
AImpl_EnumObjects
,
SysKeyboard
AImpl_EnumObjects
,
IDirectInputDevice2AImpl_GetProperty
,
SysKeyboardAImpl_SetProperty
,
SysKeyboardAImpl_Acquire
,
...
...
dlls/dinput/mouse/main.c
View file @
d14ad4ff
...
...
@@ -874,6 +874,7 @@ static HRESULT WINAPI SysMouseAImpl_EnumObjects(
}
/* Only the fields till dwFFMaxForce are relevant */
memset
(
&
ddoi
,
0
,
sizeof
(
ddoi
));
ddoi
.
dwSize
=
FIELD_OFFSET
(
DIDEVICEOBJECTINSTANCEA
,
dwFFMaxForce
);
/* In a mouse, we have : two relative axis and three buttons */
...
...
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