Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bf938311
Commit
bf938311
authored
Apr 13, 2014
by
Ken Thomases
Committed by
Alexandre Julliard
Apr 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Use the proper mutable Core Foundation types for mutable collections and avoid casting.
parent
4637b607
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
joystick_osx.c
dlls/dinput/joystick_osx.c
+9
-9
No files found.
dlls/dinput/joystick_osx.c
View file @
bf938311
...
...
@@ -96,7 +96,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dinput
);
static
IOHIDManagerRef
hid_manager
=
NULL
;
static
CFArrayRef
device_main_elements
=
NULL
;
static
CF
Mutable
ArrayRef
device_main_elements
=
NULL
;
typedef
struct
JoystickImpl
JoystickImpl
;
static
const
IDirectInputDevice8AVtbl
JoystickAvt
;
...
...
@@ -283,7 +283,7 @@ static CFMutableDictionaryRef create_osx_device_match(int usage)
return
result
;
}
static
CFIndex
find_top_level
(
IOHIDDeviceRef
hid_device
,
CFArrayRef
main_elements
)
static
CFIndex
find_top_level
(
IOHIDDeviceRef
hid_device
,
CF
Mutable
ArrayRef
main_elements
)
{
CFArrayRef
elements
;
CFIndex
total
=
0
;
...
...
@@ -310,7 +310,7 @@ static CFIndex find_top_level(IOHIDDeviceRef hid_device, CFArrayRef main_element
if
(
usage_page
==
kHIDPage_GenericDesktop
&&
(
usage
==
kHIDUsage_GD_Joystick
||
usage
==
kHIDUsage_GD_GamePad
))
{
CFArrayAppendValue
(
(
CFMutableArrayRef
)
main_elements
,
element
);
CFArrayAppendValue
(
main_elements
,
element
);
total
++
;
}
}
...
...
@@ -319,7 +319,7 @@ static CFIndex find_top_level(IOHIDDeviceRef hid_device, CFArrayRef main_element
return
total
;
}
static
void
get_element_children
(
IOHIDElementRef
element
,
CFArrayRef
all_children
)
static
void
get_element_children
(
IOHIDElementRef
element
,
CF
Mutable
ArrayRef
all_children
)
{
CFIndex
idx
,
cnt
;
CFArrayRef
element_children
=
IOHIDElementGetChildren
(
element
);
...
...
@@ -337,7 +337,7 @@ static void get_element_children(IOHIDElementRef element, CFArrayRef all_childre
if
(
IOHIDElementGetType
(
child
)
==
kIOHIDElementTypeCollection
)
get_element_children
(
child
,
all_children
);
else
CFArrayAppendValue
(
(
CFMutableArrayRef
)
all_children
,
child
);
CFArrayAppendValue
(
all_children
,
child
);
}
}
...
...
@@ -345,7 +345,7 @@ static int find_osx_devices(void)
{
CFMutableDictionaryRef
result
;
CFSetRef
devset
;
CFArrayRef
matching
;
CF
Mutable
ArrayRef
matching
;
hid_manager
=
IOHIDManagerCreate
(
kCFAllocatorDefault
,
0L
);
if
(
IOHIDManagerOpen
(
hid_manager
,
0
)
!=
kIOReturnSuccess
)
...
...
@@ -364,14 +364,14 @@ static int find_osx_devices(void)
CFRelease
(
matching
);
return
0
;
}
CFArrayAppendValue
(
(
CFMutableArrayRef
)
matching
,
result
);
CFArrayAppendValue
(
matching
,
result
);
result
=
create_osx_device_match
(
kHIDUsage_GD_GamePad
);
if
(
!
result
)
{
CFRelease
(
matching
);
return
0
;
}
CFArrayAppendValue
(
(
CFMutableArrayRef
)
matching
,
result
);
CFArrayAppendValue
(
matching
,
result
);
IOHIDManagerSetDeviceMatchingMultiple
(
hid_manager
,
matching
);
devset
=
IOHIDManagerCopyDevices
(
hid_manager
);
...
...
@@ -458,7 +458,7 @@ static void insert_sort_button(int header, IOHIDElementRef element,
static
void
get_osx_device_elements
(
JoystickImpl
*
device
,
int
axis_map
[
8
])
{
IOHIDElementRef
device_main_element
;
CF
ArrayRef
elements
;
CF
MutableArrayRef
elements
;
DWORD
axes
=
0
;
DWORD
sliders
=
0
;
DWORD
buttons
=
0
;
...
...
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