Overview
Context
Changes
Modified src/hid/OHEvdevGameController.m
from [34e73fdaa7]
to [c2e9c0c45a].
︙ | | |
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
case BTN_X:
return @"X";
case BTN_Y:
return @"Y";
case BTN_Z:
return @"Z";
case BTN_TL:
return @"TL";
return @"LB";
case BTN_TR:
return @"TR";
return @"RB";
case BTN_TL2:
return @"TL2";
return @"LT";
case BTN_TR2:
return @"TR2";
return @"RT";
case BTN_SELECT:
return @"Select";
return @"Back";
case BTN_START:
return @"Start";
case BTN_MODE:
return @"Mode";
return @"Guide";
case BTN_THUMBL:
return @"Thumb L";
return @"LSB";
case BTN_THUMBR:
return @"Thumb R";
return @"RSB";
case BTN_DPAD_UP:
return @"D-Pad Up";
case BTN_DPAD_DOWN:
return @"D-Pad Down";
case BTN_DPAD_LEFT:
return @"D-Pad Left";
case BTN_DPAD_RIGHT:
|
︙ | | |
Modified src/hid/OHEvdevGamepad.m
from [fbbf92a317]
to [f7c0aaf892].
︙ | | |
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
-
+
-
+
|
[buttons removeObjectForKey: @"D-Pad Up"];
[buttons removeObjectForKey: @"D-Pad Down"];
[buttons removeObjectForKey: @"D-Pad Left"];
[buttons removeObjectForKey: @"D-Pad Right"];
if ([_rawProfile.axes objectForKey: @"Z"] != nil)
[buttons setObject: self.leftTriggerButton forKey: @"TL2"];
[buttons setObject: self.leftTriggerButton forKey: @"LT"];
if ([_rawProfile.axes objectForKey: @"RZ"] != nil)
[buttons setObject: self.rightTriggerButton forKey: @"TR2"];
[buttons setObject: self.rightTriggerButton forKey: @"RT"];
[buttons makeImmutable];
return buttons;
}
- (OFDictionary OF_GENERIC(OFString *, OHGameControllerAxis *) *)axes
|
︙ | | |
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
- (OHGameControllerButton *)eastButton
{
return [_rawProfile.buttons objectForKey: @"B"];
}
- (OHGameControllerButton *)leftShoulderButton
{
return [_rawProfile.buttons objectForKey: @"TL"];
return [_rawProfile.buttons objectForKey: @"LB"];
}
- (OHGameControllerButton *)rightShoulderButton
{
return [_rawProfile.buttons objectForKey: @"TR"];
return [_rawProfile.buttons objectForKey: @"RB"];
}
- (OHGameControllerButton *)leftTriggerButton
{
OHGameControllerAxis *axis = [_rawProfile.axes objectForKey: @"Z"];
if (axis != nil)
return [[[OHGameControllerEmulatedTriggerButton alloc]
initWithAxis: axis] autorelease];
return [_rawProfile.buttons objectForKey: @"TL2"];
return [_rawProfile.buttons objectForKey: @"LT"];
}
- (OHGameControllerButton *)rightTriggerButton
{
OHGameControllerAxis *axis = [_rawProfile.axes objectForKey: @"RZ"];
if (axis != nil)
return [[[OHGameControllerEmulatedTriggerButton alloc]
initWithAxis: axis] autorelease];
return [_rawProfile.buttons objectForKey: @"TR2"];
return [_rawProfile.buttons objectForKey: @"RT"];
}
- (OHGameControllerButton *)leftThumbstickButton
{
return [_rawProfile.buttons objectForKey: @"Thumb L"];
return [_rawProfile.buttons objectForKey: @"LSB"];
}
- (OHGameControllerButton *)rightThumbstickButton
{
return [_rawProfile.buttons objectForKey: @"Thumb R"];
return [_rawProfile.buttons objectForKey: @"RSB"];
}
- (OHGameControllerButton *)menuButton
{
return [_rawProfile.buttons objectForKey: @"Start"];
}
- (OHGameControllerButton *)optionsButton
{
return [_rawProfile.buttons objectForKey: @"Select"];
return [_rawProfile.buttons objectForKey: @"Back"];
}
- (OHGameControllerButton *)homeButton
{
return [_rawProfile.buttons objectForKey: @"Mode"];
return [_rawProfile.buttons objectForKey: @"Guide"];
}
- (OHGameControllerDirectionalPad *)leftThumbstick
{
OHGameControllerAxis *xAxis = [_rawProfile.axes objectForKey: @"X"];
OHGameControllerAxis *yAxis = [_rawProfile.axes objectForKey: @"Y"];
|
︙ | | |