Differences From Artifact [251f0edbf4]:
- File src/hid/OFEvdevGameController.h — part of check-in [918c9d077a] at 2024-05-20 01:17:43 on branch gamecontroller — OFGameController: Add support for Wii (user: js, size: 1832) [annotate] [blame] [check-ins using]
To Artifact [f6b3abc284]:
- File
src/hid/OFEvdevGameController.h
— part of check-in
[8e95537be5]
at
2024-05-20 17:19:05
on branch gamecontroller
— OFEvdevGameController: Add support for polling
This is required to get the initial state and when events get dropped. (user: js, size: 1907) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | OF_ASSUME_NONNULL_BEGIN @interface OFEvdevGameController: OFGameController { OFString *_path; int _fd; uint16_t _vendorID, _productID; OFString *_name; OFMutableSet OF_GENERIC(OFGameControllerButton) *_buttons; OFMutableSet OF_GENERIC(OFGameControllerButton) *_pressedButtons; bool _hasLeftAnalogStick, _hasRightAnalogStick; bool _hasLeftTriggerPressure, _hasRightTriggerPressure; unsigned int _leftTriggerPressureBit, _rightTriggerPressureBit; OFPoint _leftAnalogStickPosition, _rightAnalogStickPosition; float _leftTriggerPressure, _rightTriggerPressure; int32_t _leftAnalogStickMinX, _leftAnalogStickMaxX; int32_t _leftAnalogStickMinY, _leftAnalogStickMaxY; unsigned int _rightAnalogStickXBit, _rightAnalogStickYBit; int32_t _rightAnalogStickMinX, _rightAnalogStickMaxX; int32_t _rightAnalogStickMinY, _rightAnalogStickMaxY; int32_t _leftTriggerMinPressure, _leftTriggerMaxPressure; int32_t _rightTriggerMinPressure, _rightTriggerMaxPressure; } - (instancetype)of_initWithPath: (OFString *)path OF_METHOD_FAMILY(init); @end OF_ASSUME_NONNULL_END | > > > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | OF_ASSUME_NONNULL_BEGIN @interface OFEvdevGameController: OFGameController { OFString *_path; int _fd; bool _discardUntilReport; unsigned long *_keyBits; uint16_t _vendorID, _productID; OFString *_name; OFMutableSet OF_GENERIC(OFGameControllerButton) *_buttons; OFMutableSet OF_GENERIC(OFGameControllerButton) *_pressedButtons; bool _hasLeftAnalogStick, _hasRightAnalogStick; bool _hasLeftTriggerPressure, _hasRightTriggerPressure; unsigned int _leftTriggerPressureBit, _rightTriggerPressureBit; OFPoint _leftAnalogStickPosition, _rightAnalogStickPosition; float _leftTriggerPressure, _rightTriggerPressure; int32_t _leftAnalogStickMinX, _leftAnalogStickMaxX; int32_t _leftAnalogStickMinY, _leftAnalogStickMaxY; unsigned int _rightAnalogStickXBit, _rightAnalogStickYBit; int32_t _rightAnalogStickMinX, _rightAnalogStickMaxX; int32_t _rightAnalogStickMinY, _rightAnalogStickMaxY; int32_t _leftTriggerMinPressure, _leftTriggerMaxPressure; int32_t _rightTriggerMinPressure, _rightTriggerMaxPressure; } - (instancetype)of_initWithPath: (OFString *)path OF_METHOD_FAMILY(init); - (void)of_pollState; @end OF_ASSUME_NONNULL_END |