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
5eb5f94f
Commit
5eb5f94f
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_GetCapabilities WtoA conversions.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5df60ff2
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
24 deletions
+13
-24
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
-6
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
-7
mouse.c
dlls/dinput/mouse.c
+1
-7
No files found.
dlls/dinput/ansi.c
View file @
5eb5f94f
...
...
@@ -130,6 +130,13 @@ ULONG WINAPI IDirectInputDevice2AImpl_Release( IDirectInputDevice8A *iface_a )
return
IDirectInputDevice8_Release
(
iface_w
);
}
HRESULT
WINAPI
IDirectInputDevice2AImpl_GetCapabilities
(
IDirectInputDevice8A
*
iface_a
,
DIDEVCAPS
*
caps
)
{
IDirectInputDeviceImpl
*
impl
=
impl_from_IDirectInputDevice8A
(
iface_a
);
IDirectInputDevice8W
*
iface_w
=
IDirectInputDevice8W_from_impl
(
impl
);
return
IDirectInputDevice8_GetCapabilities
(
iface_w
,
caps
);
}
struct
enum_objects_wtoa_params
{
LPDIENUMDEVICEOBJECTSCALLBACKA
callback
;
...
...
dlls/dinput/device_private.h
View file @
5eb5f94f
...
...
@@ -144,6 +144,7 @@ extern HRESULT WINAPI IDirectInputDevice2AImpl_SetEventNotification(LPDIRECTINPU
extern
HRESULT
WINAPI
IDirectInputDevice2WImpl_SetEventNotification
(
LPDIRECTINPUTDEVICE8W
iface
,
HANDLE
hnd
)
DECLSPEC_HIDDEN
;
extern
ULONG
WINAPI
IDirectInputDevice2AImpl_Release
(
LPDIRECTINPUTDEVICE8A
iface
)
DECLSPEC_HIDDEN
;
extern
ULONG
WINAPI
IDirectInputDevice2WImpl_Release
(
LPDIRECTINPUTDEVICE8W
iface
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
IDirectInputDevice2AImpl_GetCapabilities
(
LPDIRECTINPUTDEVICE8A
iface
,
DIDEVCAPS
*
caps
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
IDirectInputDevice2AImpl_QueryInterface
(
LPDIRECTINPUTDEVICE8A
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
IDirectInputDevice2WImpl_QueryInterface
(
LPDIRECTINPUTDEVICE8W
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
DECLSPEC_HIDDEN
;
extern
ULONG
WINAPI
IDirectInputDevice2AImpl_AddRef
(
LPDIRECTINPUTDEVICE8A
iface
)
DECLSPEC_HIDDEN
;
...
...
dlls/dinput/joystick.c
View file @
5eb5f94f
...
...
@@ -542,12 +542,6 @@ HRESULT WINAPI JoystickWGenericImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface,
return
DI_OK
;
}
HRESULT
WINAPI
JoystickAGenericImpl_GetCapabilities
(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIDEVCAPS
lpDIDevCaps
)
{
JoystickGenericImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
return
JoystickWGenericImpl_GetCapabilities
(
IDirectInputDevice8W_from_impl
(
This
),
lpDIDevCaps
);
}
/******************************************************************************
* GetObjectInfo : get object info
*/
...
...
dlls/dinput/joystick_linux.c
View file @
5eb5f94f
...
...
@@ -907,7 +907,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
IDirectInputDevice2AImpl_QueryInterface
,
IDirectInputDevice2AImpl_AddRef
,
IDirectInputDevice2AImpl_Release
,
JoystickAGeneric
Impl_GetCapabilities
,
IDirectInputDevice2A
Impl_GetCapabilities
,
IDirectInputDevice2AImpl_EnumObjects
,
IDirectInputDevice2AImpl_GetProperty
,
IDirectInputDevice2AImpl_SetProperty
,
...
...
dlls/dinput/joystick_linuxinput.c
View file @
5eb5f94f
...
...
@@ -1338,7 +1338,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
IDirectInputDevice2AImpl_QueryInterface
,
IDirectInputDevice2AImpl_AddRef
,
IDirectInputDevice2AImpl_Release
,
JoystickAGeneric
Impl_GetCapabilities
,
IDirectInputDevice2A
Impl_GetCapabilities
,
IDirectInputDevice2AImpl_EnumObjects
,
IDirectInputDevice2AImpl_GetProperty
,
IDirectInputDevice2AImpl_SetProperty
,
...
...
dlls/dinput/joystick_osx.c
View file @
5eb5f94f
...
...
@@ -1579,7 +1579,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
IDirectInputDevice2AImpl_QueryInterface
,
IDirectInputDevice2AImpl_AddRef
,
IDirectInputDevice2AImpl_Release
,
JoystickAGeneric
Impl_GetCapabilities
,
IDirectInputDevice2A
Impl_GetCapabilities
,
IDirectInputDevice2AImpl_EnumObjects
,
IDirectInputDevice2AImpl_GetProperty
,
IDirectInputDevice2AImpl_SetProperty
,
...
...
dlls/dinput/joystick_private.h
View file @
5eb5f94f
...
...
@@ -64,7 +64,6 @@ HRESULT WINAPI JoystickWGenericImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
HRESULT
WINAPI
JoystickWGenericImpl_GetProperty
(
LPDIRECTINPUTDEVICE8W
iface
,
REFGUID
rguid
,
LPDIPROPHEADER
pdiph
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
JoystickAGenericImpl_GetCapabilities
(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIDEVCAPS
lpDIDevCaps
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
JoystickWGenericImpl_GetCapabilities
(
LPDIRECTINPUTDEVICE8W
iface
,
LPDIDEVCAPS
lpDIDevCaps
)
DECLSPEC_HIDDEN
;
void
_dump_DIDEVCAPS
(
const
DIDEVCAPS
*
lpDIDevCaps
)
DECLSPEC_HIDDEN
;
...
...
dlls/dinput/keyboard.c
View file @
5eb5f94f
...
...
@@ -419,12 +419,6 @@ static HRESULT WINAPI SysKeyboardWImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W ifa
return
DI_OK
;
}
static
HRESULT
WINAPI
SysKeyboardAImpl_GetCapabilities
(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIDEVCAPS
lpDIDevCaps
)
{
SysKeyboardImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
return
SysKeyboardWImpl_GetCapabilities
(
IDirectInputDevice8W_from_impl
(
This
),
lpDIDevCaps
);
}
static
DWORD
map_dik_to_scan
(
DWORD
dik_code
,
DWORD
subtype
)
{
if
(
dik_code
==
DIK_PAUSE
||
dik_code
==
DIK_NUMLOCK
)
dik_code
^=
0x80
;
...
...
@@ -657,7 +651,7 @@ static const IDirectInputDevice8AVtbl SysKeyboardAvt =
IDirectInputDevice2AImpl_QueryInterface
,
IDirectInputDevice2AImpl_AddRef
,
IDirectInputDevice2AImpl_Release
,
SysKeyboard
AImpl_GetCapabilities
,
IDirectInputDevice2
AImpl_GetCapabilities
,
IDirectInputDevice2AImpl_EnumObjects
,
IDirectInputDevice2AImpl_GetProperty
,
IDirectInputDevice2AImpl_SetProperty
,
...
...
dlls/dinput/mouse.c
View file @
5eb5f94f
...
...
@@ -761,12 +761,6 @@ static HRESULT WINAPI SysMouseWImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface,
return
DI_OK
;
}
static
HRESULT
WINAPI
SysMouseAImpl_GetCapabilities
(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIDEVCAPS
lpDIDevCaps
)
{
SysMouseImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
return
SysMouseWImpl_GetCapabilities
(
IDirectInputDevice8W_from_impl
(
This
),
lpDIDevCaps
);
}
/******************************************************************************
* GetObjectInfo : get information about a device object such as a button
* or axis
...
...
@@ -911,7 +905,7 @@ static const IDirectInputDevice8AVtbl SysMouseAvt =
IDirectInputDevice2AImpl_QueryInterface
,
IDirectInputDevice2AImpl_AddRef
,
IDirectInputDevice2AImpl_Release
,
SysMouse
AImpl_GetCapabilities
,
IDirectInputDevice2
AImpl_GetCapabilities
,
IDirectInputDevice2AImpl_EnumObjects
,
IDirectInputDevice2AImpl_GetProperty
,
IDirectInputDevice2AImpl_SetProperty
,
...
...
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