Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
31c828ea
Commit
31c828ea
authored
Jan 09, 2011
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: COM cleanup - use helper function instead of direct typecast in keyboard.
parent
625fefca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
keyboard.c
dlls/dinput/keyboard.c
+15
-6
No files found.
dlls/dinput/keyboard.c
View file @
31c828ea
...
...
@@ -50,6 +50,15 @@ struct SysKeyboardImpl
BYTE
DInputKeyState
[
WINE_DINPUT_KEYBOARD_MAX_KEYS
];
};
static
inline
SysKeyboardImpl
*
impl_from_IDirectInputDevice8A
(
IDirectInputDevice8A
*
iface
)
{
return
(
SysKeyboardImpl
*
)
iface
;
}
static
inline
SysKeyboardImpl
*
impl_from_IDirectInputDevice8W
(
IDirectInputDevice8W
*
iface
)
{
return
(
SysKeyboardImpl
*
)
iface
;
}
static
BYTE
map_dik_code
(
DWORD
scanCode
,
DWORD
vkCode
)
{
static
const
BYTE
asciiCodes
[]
=
...
...
@@ -76,7 +85,7 @@ static BYTE map_dik_code(DWORD scanCode, DWORD vkCode)
static
int
KeyboardCallback
(
LPDIRECTINPUTDEVICE8A
iface
,
WPARAM
wparam
,
LPARAM
lparam
)
{
SysKeyboardImpl
*
This
=
(
SysKeyboardImpl
*
)
iface
;
SysKeyboardImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
)
;
int
dik_code
,
ret
=
This
->
base
.
dwCoopLevel
&
DISCL_EXCLUSIVE
;
KBDLLHOOKSTRUCT
*
hook
=
(
KBDLLHOOKSTRUCT
*
)
lparam
;
BYTE
new_diks
;
...
...
@@ -297,7 +306,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
LPDIRECTINPUTDEVICE8A
iface
,
DWORD
len
,
LPVOID
ptr
)
{
SysKeyboardImpl
*
This
=
(
SysKeyboardImpl
*
)
iface
;
SysKeyboardImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
)
;
TRACE
(
"(%p)->(%d,%p)
\n
"
,
This
,
len
,
ptr
);
if
(
!
This
->
base
.
acquired
)
return
DIERR_NOTACQUIRED
;
...
...
@@ -328,7 +337,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetCapabilities(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIDEVCAPS
lpDIDevCaps
)
{
SysKeyboardImpl
*
This
=
(
SysKeyboardImpl
*
)
iface
;
SysKeyboardImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
)
;
DIDEVCAPS
devcaps
;
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
lpDIDevCaps
);
...
...
@@ -410,7 +419,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceInfo(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIDEVICEINSTANCEA
pdidi
)
{
SysKeyboardImpl
*
This
=
(
SysKeyboardImpl
*
)
iface
;
SysKeyboardImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
)
;
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
pdidi
);
if
(
pdidi
->
dwSize
!=
sizeof
(
DIDEVICEINSTANCEA
))
{
...
...
@@ -423,9 +432,9 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceInfo(
return
DI_OK
;
}
static
HRESULT
WINAPI
SysKeyboardWImpl_GetDeviceInfo
(
LPDIRECTINPUTDEVICE8W
iface
,
LPDIDEVICEINSTANCEW
pdidi
)
static
HRESULT
WINAPI
SysKeyboardWImpl_GetDeviceInfo
(
LPDIRECTINPUTDEVICE8W
iface
,
LPDIDEVICEINSTANCEW
pdidi
)
{
SysKeyboardImpl
*
This
=
(
SysKeyboardImpl
*
)
iface
;
SysKeyboardImpl
*
This
=
impl_from_IDirectInputDevice8W
(
iface
)
;
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
pdidi
);
if
(
pdidi
->
dwSize
!=
sizeof
(
DIDEVICEINSTANCEW
))
{
...
...
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