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
7713050c
Commit
7713050c
authored
May 27, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
May 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Factor out IDirectInputDevice_GetDeviceState WtoA conversions.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5eb5f94f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
38 deletions
+13
-38
ansi.c
dlls/dinput/ansi.c
+7
-0
device_private.h
dlls/dinput/device_private.h
+1
-0
joystick.c
dlls/dinput/joystick.c
+0
-11
joystick_linux.c
dlls/dinput/joystick_linux.c
+1
-1
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+1
-1
joystick_osx.c
dlls/dinput/joystick_osx.c
+1
-1
joystick_private.h
dlls/dinput/joystick_private.h
+0
-1
keyboard.c
dlls/dinput/keyboard.c
+1
-11
mouse.c
dlls/dinput/mouse.c
+1
-12
No files found.
dlls/dinput/ansi.c
View file @
7713050c
...
...
@@ -192,6 +192,13 @@ HRESULT WINAPI IDirectInputDevice2AImpl_Unacquire( IDirectInputDevice8A *iface_a
return
IDirectInputDevice8_Unacquire
(
iface_w
);
}
HRESULT
WINAPI
IDirectInputDevice2AImpl_GetDeviceState
(
IDirectInputDevice8A
*
iface_a
,
DWORD
count
,
void
*
data
)
{
IDirectInputDeviceImpl
*
impl
=
impl_from_IDirectInputDevice8A
(
iface_a
);
IDirectInputDevice8W
*
iface_w
=
IDirectInputDevice8W_from_impl
(
impl
);
return
IDirectInputDevice8_GetDeviceState
(
iface_w
,
count
,
data
);
}
HRESULT
WINAPI
IDirectInputDevice2AImpl_GetDeviceData
(
IDirectInputDevice8A
*
iface_a
,
DWORD
data_size
,
DIDEVICEOBJECTDATA
*
data
,
DWORD
*
entries
,
DWORD
flags
)
{
...
...
dlls/dinput/device_private.h
View file @
7713050c
...
...
@@ -136,6 +136,7 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_Acquire(LPDIRECTINPUTDEVICE8A ifa
extern
HRESULT
WINAPI
IDirectInputDevice2WImpl_Acquire
(
LPDIRECTINPUTDEVICE8W
iface
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
IDirectInputDevice2AImpl_Unacquire
(
LPDIRECTINPUTDEVICE8A
iface
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
IDirectInputDevice2WImpl_Unacquire
(
LPDIRECTINPUTDEVICE8W
iface
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
IDirectInputDevice2AImpl_GetDeviceState
(
LPDIRECTINPUTDEVICE8A
iface
,
DWORD
count
,
void
*
data
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
IDirectInputDevice2AImpl_SetDataFormat
(
LPDIRECTINPUTDEVICE8A
iface
,
LPCDIDATAFORMAT
df
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
IDirectInputDevice2WImpl_SetDataFormat
(
LPDIRECTINPUTDEVICE8W
iface
,
LPCDIDATAFORMAT
df
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
IDirectInputDevice2AImpl_SetCooperativeLevel
(
LPDIRECTINPUTDEVICE8A
iface
,
HWND
hwnd
,
DWORD
dwflags
)
DECLSPEC_HIDDEN
;
...
...
dlls/dinput/joystick.c
View file @
7713050c
...
...
@@ -68,10 +68,6 @@ static inline JoystickGenericImpl *impl_from_IDirectInputDevice8W(IDirectInputDe
{
return
CONTAINING_RECORD
(
CONTAINING_RECORD
(
iface
,
IDirectInputDeviceImpl
,
IDirectInputDevice8W_iface
),
JoystickGenericImpl
,
base
);
}
static
inline
IDirectInputDevice8W
*
IDirectInputDevice8W_from_impl
(
JoystickGenericImpl
*
This
)
{
return
&
This
->
base
.
IDirectInputDevice8W_iface
;
}
DWORD
typeFromGUID
(
REFGUID
guid
)
{
...
...
@@ -773,13 +769,6 @@ HRESULT WINAPI JoystickWGenericImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W iface,
return
DI_OK
;
}
HRESULT
WINAPI
JoystickAGenericImpl_GetDeviceState
(
LPDIRECTINPUTDEVICE8A
iface
,
DWORD
len
,
LPVOID
ptr
)
{
JoystickGenericImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
return
JoystickWGenericImpl_GetDeviceState
(
IDirectInputDevice8W_from_impl
(
This
),
len
,
ptr
);
}
HRESULT
WINAPI
JoystickWGenericImpl_BuildActionMap
(
LPDIRECTINPUTDEVICE8W
iface
,
LPDIACTIONFORMATW
lpdiaf
,
LPCWSTR
lpszUserName
,
...
...
dlls/dinput/joystick_linux.c
View file @
7713050c
...
...
@@ -913,7 +913,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
IDirectInputDevice2AImpl_SetProperty
,
IDirectInputDevice2AImpl_Acquire
,
IDirectInputDevice2AImpl_Unacquire
,
JoystickAGeneric
Impl_GetDeviceState
,
IDirectInputDevice2A
Impl_GetDeviceState
,
IDirectInputDevice2AImpl_GetDeviceData
,
IDirectInputDevice2AImpl_SetDataFormat
,
IDirectInputDevice2AImpl_SetEventNotification
,
...
...
dlls/dinput/joystick_linuxinput.c
View file @
7713050c
...
...
@@ -1344,7 +1344,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
IDirectInputDevice2AImpl_SetProperty
,
IDirectInputDevice2AImpl_Acquire
,
IDirectInputDevice2AImpl_Unacquire
,
JoystickAGeneric
Impl_GetDeviceState
,
IDirectInputDevice2A
Impl_GetDeviceState
,
IDirectInputDevice2AImpl_GetDeviceData
,
IDirectInputDevice2AImpl_SetDataFormat
,
IDirectInputDevice2AImpl_SetEventNotification
,
...
...
dlls/dinput/joystick_osx.c
View file @
7713050c
...
...
@@ -1585,7 +1585,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
IDirectInputDevice2AImpl_SetProperty
,
IDirectInputDevice2AImpl_Acquire
,
IDirectInputDevice2AImpl_Unacquire
,
JoystickAGeneric
Impl_GetDeviceState
,
IDirectInputDevice2A
Impl_GetDeviceState
,
IDirectInputDevice2AImpl_GetDeviceData
,
IDirectInputDevice2AImpl_SetDataFormat
,
IDirectInputDevice2AImpl_SetEventNotification
,
...
...
dlls/dinput/joystick_private.h
View file @
7713050c
...
...
@@ -78,7 +78,6 @@ HRESULT WINAPI JoystickWGenericImpl_GetDeviceInfo( LPDIRECTINPUTDEVICE8W iface,
HRESULT
WINAPI
JoystickWGenericImpl_Poll
(
LPDIRECTINPUTDEVICE8W
iface
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
JoystickAGenericImpl_GetDeviceState
(
LPDIRECTINPUTDEVICE8A
iface
,
DWORD
len
,
LPVOID
ptr
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
JoystickWGenericImpl_GetDeviceState
(
LPDIRECTINPUTDEVICE8W
iface
,
DWORD
len
,
LPVOID
ptr
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
JoystickAGenericImpl_BuildActionMap
(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIACTIONFORMATA
lpdiaf
,
LPCSTR
lpszUserName
,
DWORD
dwFlags
)
DECLSPEC_HIDDEN
;
...
...
dlls/dinput/keyboard.c
View file @
7713050c
...
...
@@ -59,10 +59,6 @@ static inline SysKeyboardImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice
{
return
CONTAINING_RECORD
(
CONTAINING_RECORD
(
iface
,
IDirectInputDeviceImpl
,
IDirectInputDevice8W_iface
),
SysKeyboardImpl
,
base
);
}
static
inline
IDirectInputDevice8W
*
IDirectInputDevice8W_from_impl
(
SysKeyboardImpl
*
This
)
{
return
&
This
->
base
.
IDirectInputDevice8W_iface
;
}
static
BYTE
map_dik_code
(
DWORD
scanCode
,
DWORD
vkCode
,
DWORD
subType
,
DWORD
version
)
{
...
...
@@ -378,12 +374,6 @@ static HRESULT WINAPI SysKeyboardWImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W ifac
return
DI_OK
;
}
static
HRESULT
WINAPI
SysKeyboardAImpl_GetDeviceState
(
LPDIRECTINPUTDEVICE8A
iface
,
DWORD
len
,
LPVOID
ptr
)
{
SysKeyboardImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
return
SysKeyboardWImpl_GetDeviceState
(
IDirectInputDevice8W_from_impl
(
This
),
len
,
ptr
);
}
/******************************************************************************
* GetCapabilities : get the device capabilities
*/
...
...
@@ -657,7 +647,7 @@ static const IDirectInputDevice8AVtbl SysKeyboardAvt =
IDirectInputDevice2AImpl_SetProperty
,
IDirectInputDevice2AImpl_Acquire
,
IDirectInputDevice2AImpl_Unacquire
,
SysKeyboard
AImpl_GetDeviceState
,
IDirectInputDevice2
AImpl_GetDeviceState
,
IDirectInputDevice2AImpl_GetDeviceData
,
IDirectInputDevice2AImpl_SetDataFormat
,
IDirectInputDevice2AImpl_SetEventNotification
,
...
...
dlls/dinput/mouse.c
View file @
7713050c
...
...
@@ -87,11 +87,6 @@ static inline SysMouseImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice8W
return
CONTAINING_RECORD
(
CONTAINING_RECORD
(
iface
,
IDirectInputDeviceImpl
,
IDirectInputDevice8W_iface
),
SysMouseImpl
,
base
);
}
static
inline
IDirectInputDevice8W
*
IDirectInputDevice8W_from_impl
(
SysMouseImpl
*
This
)
{
return
&
This
->
base
.
IDirectInputDevice8W_iface
;
}
static
void
_dump_mouse_state
(
const
DIMOUSESTATE2
*
m_state
)
{
int
i
;
...
...
@@ -647,12 +642,6 @@ static HRESULT WINAPI SysMouseWImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W iface,
return
DI_OK
;
}
static
HRESULT
WINAPI
SysMouseAImpl_GetDeviceState
(
LPDIRECTINPUTDEVICE8A
iface
,
DWORD
len
,
LPVOID
ptr
)
{
SysMouseImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
return
SysMouseWImpl_GetDeviceState
(
IDirectInputDevice8W_from_impl
(
This
),
len
,
ptr
);
}
/******************************************************************************
* GetDeviceData : gets buffered input data.
*/
...
...
@@ -911,7 +900,7 @@ static const IDirectInputDevice8AVtbl SysMouseAvt =
IDirectInputDevice2AImpl_SetProperty
,
IDirectInputDevice2AImpl_Acquire
,
IDirectInputDevice2AImpl_Unacquire
,
SysMouse
AImpl_GetDeviceState
,
IDirectInputDevice2
AImpl_GetDeviceState
,
IDirectInputDevice2AImpl_GetDeviceData
,
IDirectInputDevice2AImpl_SetDataFormat
,
IDirectInputDevice2AImpl_SetEventNotification
,
...
...
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