59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
-
+
-
+
|
- (instancetype)init
{
self = [super init];
@try {
_gamepad = [[OHNintendoDSGamepad alloc] init];
[self retrieveState];
[self updateState];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[_gamepad release];
[super dealloc];
}
- (void)retrieveState
- (void)updateState
{
OFDictionary *buttons = _gamepad.buttons;
OHGameControllerDirectionalPad *dPad =
[_gamepad.directionalPads objectForKey: @"D-Pad"];
u32 keys;
scanKeys();
|