17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
* <https://www.gnu.org/licenses/>.
*/
#import "OHGameController.h"
#import "OHGameControllerProfile.h"
OF_ASSUME_NONNULL_BEGIN
@interface OHEvdevGameController: OHGameController
{
OFString *_path;
int _fd;
bool _discardUntilReport;
unsigned long *_evBits, *_keyBits, *_absBits;
uint16_t _vendorID, _productID;
OFString *_name;
id <OHGameControllerProfile> _rawProfile;
}
- (instancetype)initWithPath: (OFString *)path;
- (void)oh_pollState;
@end
OF_ASSUME_NONNULL_END
|
>
>
>
>
>
|
>
>
>
>
>
|
17
18
19
20
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
|
* <https://www.gnu.org/licenses/>.
*/
#import "OHGameController.h"
#import "OHGameControllerProfile.h"
OF_ASSUME_NONNULL_BEGIN
@protocol OHEvdevMapping <OFObject>
- (OHGameControllerButton *)oh_buttonForEvdevButton: (uint16_t)button;
- (OHGameControllerAxis *)oh_axisForEvdevAxis: (uint16_t)axis;
@end
@interface OHEvdevGameController: OHGameController
{
OFString *_path;
int _fd;
bool _discardUntilReport;
unsigned long *_evBits, *_keyBits, *_absBits;
uint16_t _vendorID, _productID;
OFString *_name;
id <OHGameControllerProfile, OHEvdevMapping> _profile;
}
- (instancetype)initWithPath: (OFString *)path;
- (void)oh_pollState;
@end
extern const uint16_t OHEvdevButtonIDs[];
extern const size_t OHNumEvdevButtonIDs;
extern const uint16_t OHEvdevAxisIDs[];
extern const size_t OHNumEvdevAxisIDs;
OF_ASSUME_NONNULL_END
|