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
4ce1da04
Commit
4ce1da04
authored
May 23, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
May 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Report axes that support FF for OSX joysticks.
parent
1b0b0ab9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
12 deletions
+43
-12
device.c
dlls/dinput/device.c
+4
-4
joystick_osx.c
dlls/dinput/joystick_osx.c
+39
-8
No files found.
dlls/dinput/device.c
View file @
4ce1da04
...
...
@@ -145,13 +145,13 @@ void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) {
}
void
_dump_OBJECTINSTANCEA
(
const
DIDEVICEOBJECTINSTANCEA
*
ddoi
)
{
TRACE
(
" - enumerating : %s ('%s') - %2d - 0x%08x - %s
\n
"
,
debugstr_guid
(
&
ddoi
->
guidType
),
_dump_dinput_GUID
(
&
ddoi
->
guidType
),
ddoi
->
dwOfs
,
ddoi
->
dwType
,
ddoi
->
tszName
);
TRACE
(
" - enumerating : %s ('%s') - %2d - 0x%08x - %s
- 0x%x
\n
"
,
debugstr_guid
(
&
ddoi
->
guidType
),
_dump_dinput_GUID
(
&
ddoi
->
guidType
),
ddoi
->
dwOfs
,
ddoi
->
dwType
,
ddoi
->
tszName
,
ddoi
->
dwFlags
);
}
void
_dump_OBJECTINSTANCEW
(
const
DIDEVICEOBJECTINSTANCEW
*
ddoi
)
{
TRACE
(
" - enumerating : %s ('%s'), - %2d - 0x%08x - %s
\n
"
,
debugstr_guid
(
&
ddoi
->
guidType
),
_dump_dinput_GUID
(
&
ddoi
->
guidType
),
ddoi
->
dwOfs
,
ddoi
->
dwType
,
debugstr_w
(
ddoi
->
tszName
));
TRACE
(
" - enumerating : %s ('%s'), - %2d - 0x%08x - %s
- 0x%x
\n
"
,
debugstr_guid
(
&
ddoi
->
guidType
),
_dump_dinput_GUID
(
&
ddoi
->
guidType
),
ddoi
->
dwOfs
,
ddoi
->
dwType
,
debugstr_w
(
ddoi
->
tszName
)
,
ddoi
->
dwFlags
);
}
/* This function is a helper to convert a GUID into any possible DInput GUID out there */
...
...
dlls/dinput/joystick_osx.c
View file @
4ce1da04
...
...
@@ -841,6 +841,15 @@ static const char *osx_ff_axis_name(UInt8 axis)
return
ret
;
}
static
int
osx_axis_has_ff
(
FFCAPABILITIES
*
ffcaps
,
UInt8
axis
)
{
int
i
;
for
(
i
=
0
;
i
<
ffcaps
->
numFfAxes
;
++
i
)
if
(
ffcaps
->
ffAxes
[
i
]
==
axis
)
return
1
;
return
0
;
}
static
HRESULT
alloc_device
(
REFGUID
rguid
,
IDirectInputImpl
*
dinput
,
JoystickImpl
**
pdev
,
unsigned
short
index
)
{
...
...
@@ -939,24 +948,46 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput,
for
(
i
=
0
;
i
<
newDevice
->
generic
.
devcaps
.
dwAxes
;
i
++
)
{
int
wine_obj
=
-
1
;
int
wine_obj
=
-
1
,
has_ff
=
0
;
switch
(
axis_map
[
i
])
{
case
kHIDUsage_GD_X
:
wine_obj
=
0
;
break
;
case
kHIDUsage_GD_Y
:
wine_obj
=
1
;
break
;
case
kHIDUsage_GD_Z
:
wine_obj
=
2
;
break
;
case
kHIDUsage_GD_Rx
:
wine_obj
=
3
;
break
;
case
kHIDUsage_GD_Ry
:
wine_obj
=
4
;
break
;
case
kHIDUsage_GD_Rz
:
wine_obj
=
5
;
break
;
case
kHIDUsage_GD_X
:
wine_obj
=
0
;
has_ff
=
(
newDevice
->
ff
!=
0
)
&&
osx_axis_has_ff
(
&
ffcaps
,
FFJOFS_X
);
break
;
case
kHIDUsage_GD_Y
:
wine_obj
=
1
;
has_ff
=
(
newDevice
->
ff
!=
0
)
&&
osx_axis_has_ff
(
&
ffcaps
,
FFJOFS_Y
);
break
;
case
kHIDUsage_GD_Z
:
wine_obj
=
2
;
has_ff
=
(
newDevice
->
ff
!=
0
)
&&
osx_axis_has_ff
(
&
ffcaps
,
FFJOFS_Z
);
break
;
case
kHIDUsage_GD_Rx
:
wine_obj
=
3
;
has_ff
=
(
newDevice
->
ff
!=
0
)
&&
osx_axis_has_ff
(
&
ffcaps
,
FFJOFS_RX
);
break
;
case
kHIDUsage_GD_Ry
:
wine_obj
=
4
;
has_ff
=
(
newDevice
->
ff
!=
0
)
&&
osx_axis_has_ff
(
&
ffcaps
,
FFJOFS_RY
);
break
;
case
kHIDUsage_GD_Rz
:
wine_obj
=
5
;
has_ff
=
(
newDevice
->
ff
!=
0
)
&&
osx_axis_has_ff
(
&
ffcaps
,
FFJOFS_RZ
);
break
;
case
kHIDUsage_GD_Slider
:
wine_obj
=
6
+
slider_count
;
has_ff
=
(
newDevice
->
ff
!=
0
)
&&
osx_axis_has_ff
(
&
ffcaps
,
FFJOFS_SLIDER
(
slider_count
));
slider_count
++
;
break
;
}
if
(
wine_obj
<
0
)
continue
;
memcpy
(
&
df
->
rgodf
[
idx
],
&
c_dfDIJoystick2
.
rgodf
[
wine_obj
],
df
->
dwObjSize
);
df
->
rgodf
[
idx
++
].
dwType
=
DIDFT_MAKEINSTANCE
(
wine_obj
)
|
DIDFT_ABSAXIS
;
df
->
rgodf
[
idx
].
dwType
=
DIDFT_MAKEINSTANCE
(
wine_obj
)
|
DIDFT_ABSAXIS
;
if
(
has_ff
)
df
->
rgodf
[
idx
].
dwFlags
|=
DIDOI_FFACTUATOR
;
++
idx
;
}
for
(
i
=
0
;
i
<
newDevice
->
generic
.
devcaps
.
dwPOVs
;
i
++
)
...
...
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