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
36f538eb
Commit
36f538eb
authored
Mar 09, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Mar 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Remove easy redundancy from linuxinput.
parent
922b66e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
48 deletions
+2
-48
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+2
-48
No files found.
dlls/dinput/joystick_linuxinput.c
View file @
36f538eb
...
...
@@ -1070,52 +1070,6 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
}
/******************************************************************************
* GetObjectInfo : get information about a device object such as a button
* or axis
*/
static
HRESULT
WINAPI
JoystickWImpl_GetObjectInfo
(
LPDIRECTINPUTDEVICE8W
iface
,
LPDIDEVICEOBJECTINSTANCEW
pdidoi
,
DWORD
dwObj
,
DWORD
dwHow
)
{
static
const
WCHAR
axisW
[]
=
{
'A'
,
'x'
,
'i'
,
's'
,
' '
,
'%'
,
'd'
,
0
};
static
const
WCHAR
povW
[]
=
{
'P'
,
'O'
,
'V'
,
' '
,
'%'
,
'd'
,
0
};
static
const
WCHAR
buttonW
[]
=
{
'B'
,
'u'
,
't'
,
't'
,
'o'
,
'n'
,
' '
,
'%'
,
'd'
,
0
};
HRESULT
res
;
res
=
IDirectInputDevice2WImpl_GetObjectInfo
(
iface
,
pdidoi
,
dwObj
,
dwHow
);
if
(
res
!=
DI_OK
)
return
res
;
if
(
pdidoi
->
dwType
&
DIDFT_AXIS
)
sprintfW
(
pdidoi
->
tszName
,
axisW
,
DIDFT_GETINSTANCE
(
pdidoi
->
dwType
));
else
if
(
pdidoi
->
dwType
&
DIDFT_POV
)
sprintfW
(
pdidoi
->
tszName
,
povW
,
DIDFT_GETINSTANCE
(
pdidoi
->
dwType
));
else
if
(
pdidoi
->
dwType
&
DIDFT_BUTTON
)
sprintfW
(
pdidoi
->
tszName
,
buttonW
,
DIDFT_GETINSTANCE
(
pdidoi
->
dwType
));
_dump_OBJECTINSTANCEW
(
pdidoi
);
return
res
;
}
static
HRESULT
WINAPI
JoystickAImpl_GetObjectInfo
(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIDEVICEOBJECTINSTANCEA
pdidoi
,
DWORD
dwObj
,
DWORD
dwHow
)
{
HRESULT
res
;
DIDEVICEOBJECTINSTANCEW
didoiW
;
DWORD
dwSize
=
pdidoi
->
dwSize
;
didoiW
.
dwSize
=
sizeof
(
didoiW
);
res
=
JoystickWImpl_GetObjectInfo
((
LPDIRECTINPUTDEVICE8W
)
iface
,
&
didoiW
,
dwObj
,
dwHow
);
if
(
res
!=
DI_OK
)
return
res
;
memset
(
pdidoi
,
0
,
pdidoi
->
dwSize
);
memcpy
(
pdidoi
,
&
didoiW
,
FIELD_OFFSET
(
DIDEVICEOBJECTINSTANCEW
,
tszName
));
pdidoi
->
dwSize
=
dwSize
;
WideCharToMultiByte
(
CP_ACP
,
0
,
didoiW
.
tszName
,
-
1
,
pdidoi
->
tszName
,
sizeof
(
pdidoi
->
tszName
),
NULL
,
NULL
);
return
res
;
}
/******************************************************************************
* CreateEffect - Create a new FF effect with the specified params
*/
static
HRESULT
WINAPI
JoystickAImpl_CreateEffect
(
LPDIRECTINPUTDEVICE8A
iface
,
...
...
@@ -1516,7 +1470,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
IDirectInputDevice2AImpl_SetDataFormat
,
IDirectInputDevice2AImpl_SetEventNotification
,
IDirectInputDevice2AImpl_SetCooperativeLevel
,
JoystickAImpl_GetObjectInfo
,
JoystickA
Generic
Impl_GetObjectInfo
,
JoystickAImpl_GetDeviceInfo
,
IDirectInputDevice2AImpl_RunControlPanel
,
IDirectInputDevice2AImpl_Initialize
,
...
...
@@ -1558,7 +1512,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt =
XCAST
(
SetDataFormat
)
IDirectInputDevice2AImpl_SetDataFormat
,
XCAST
(
SetEventNotification
)
IDirectInputDevice2AImpl_SetEventNotification
,
XCAST
(
SetCooperativeLevel
)
IDirectInputDevice2AImpl_SetCooperativeLevel
,
JoystickWImpl_GetObjectInfo
,
JoystickW
Generic
Impl_GetObjectInfo
,
JoystickWImpl_GetDeviceInfo
,
XCAST
(
RunControlPanel
)
IDirectInputDevice2AImpl_RunControlPanel
,
XCAST
(
Initialize
)
IDirectInputDevice2AImpl_Initialize
,
...
...
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