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
ae16df65
Commit
ae16df65
authored
Mar 10, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Mar 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Add OS/X sliders.
parent
08388a3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
joystick_osx.c
dlls/dinput/joystick_osx.c
+17
-0
No files found.
dlls/dinput/joystick_osx.c
View file @
ae16df65
...
...
@@ -289,6 +289,7 @@ static void get_osx_device_elements(JoystickImpl *device, int axis_map[8])
IOHIDDeviceRef
tIOHIDDeviceRef
;
CFArrayRef
gElementCFArrayRef
;
DWORD
axes
=
0
;
DWORD
sliders
=
0
;
DWORD
buttons
=
0
;
DWORD
povs
=
0
;
...
...
@@ -343,6 +344,11 @@ static void get_osx_device_elements(JoystickImpl *device, int axis_map[8])
povs
++
;
break
;
}
case
kHIDUsage_GD_Slider
:
sliders
++
;
if
(
sliders
>
2
)
break
;
/* fallthrough, sliders are axis */
case
kHIDUsage_GD_X
:
case
kHIDUsage_GD_Y
:
case
kHIDUsage_GD_Z
:
...
...
@@ -413,6 +419,7 @@ static void poll_osx_device_state(JoystickGenericImpl *device_in)
{
int
button_idx
=
0
;
int
pov_idx
=
0
;
int
slider_idx
=
0
;
CFIndex
idx
,
cnt
=
CFArrayGetCount
(
gElementCFArrayRef
);
for
(
idx
=
0
;
idx
<
cnt
;
idx
++
)
...
...
@@ -455,6 +462,7 @@ static void poll_osx_device_state(JoystickGenericImpl *device_in)
case
kHIDUsage_GD_Rx
:
case
kHIDUsage_GD_Ry
:
case
kHIDUsage_GD_Rz
:
case
kHIDUsage_GD_Slider
:
{
IOHIDDeviceGetValue
(
tIOHIDDeviceRef
,
tIOHIDElementRef
,
&
valueRef
);
val
=
IOHIDValueGetIntegerValue
(
valueRef
);
...
...
@@ -478,6 +486,10 @@ static void poll_osx_device_state(JoystickGenericImpl *device_in)
case
kHIDUsage_GD_Rz
:
device
->
generic
.
js
.
lRz
=
joystick_map_axis
(
&
device
->
generic
.
props
[
idx
],
val
);
break
;
case
kHIDUsage_GD_Slider
:
device
->
generic
.
js
.
rglSlider
[
slider_idx
]
=
joystick_map_axis
(
&
device
->
generic
.
props
[
idx
],
val
);
slider_idx
++
;
break
;
}
break
;
}
...
...
@@ -585,6 +597,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
LPDIDATAFORMAT
df
=
NULL
;
int
idx
=
0
;
int
axis_map
[
8
];
/* max axes */
int
slider_count
=
0
;
TRACE
(
"%s %p %p %p %hu
\n
"
,
debugstr_guid
(
rguid
),
jvt
,
dinput
,
pdev
,
index
);
...
...
@@ -644,6 +657,10 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
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_Slider
:
wine_obj
=
6
+
slider_count
;
slider_count
++
;
break
;
}
if
(
wine_obj
<
0
)
continue
;
...
...
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