internal/gamepad: clean up codes for Darwin

* Removes redundant assignments.
* Fixes types for the Apple libraries.

Updates #1162
This commit is contained in:
Hajime Hoshi 2022-09-16 00:25:51 +09:00
parent 4a569be6f6
commit b13fa2817c
2 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,7 @@ func _CFRunLoopGetMain() _CFRunLoopRef {
} }
func _CFRunLoopRunInMode(mode _CFRunLoopMode, seconds _CFTimeInterval, returnAfterSourceHandled bool) _CFRunLoopRunResult { func _CFRunLoopRunInMode(mode _CFRunLoopMode, seconds _CFTimeInterval, returnAfterSourceHandled bool) _CFRunLoopRunResult {
var b uintptr = 0 var b uintptr
if returnAfterSourceHandled { if returnAfterSourceHandled {
b = 1 b = 1
} }

View File

@ -79,8 +79,8 @@ type _IOHIDManagerRef uintptr
type _IOHIDDeviceRef uintptr type _IOHIDDeviceRef uintptr
type _IOHIDElementRef uintptr type _IOHIDElementRef uintptr
type _IOHIDValueRef uintptr type _IOHIDValueRef uintptr
type _IOReturn int type _IOReturn int32
type _IOHIDElementType uint type _IOHIDElementType uint32
type _IOHIDDeviceCallback func(context unsafe.Pointer, result _IOReturn, sender unsafe.Pointer, device _IOHIDDeviceRef) type _IOHIDDeviceCallback func(context unsafe.Pointer, result _IOReturn, sender unsafe.Pointer, device _IOHIDDeviceRef)