ObjFW  Diff

Differences From Artifact [f6f484278c]:

To Artifact [564dd9be04]:


62
63
64
65
66
67
68
69

70
71

72
73

74
75

76
77
78
79
80
81
82
62
63
64
65
66
67
68

69
70

71
72

73
74

75
76
77
78
79
80
81
82







-
+

-
+

-
+

-
+







	case BTN_X:
		return @"X";
	case BTN_Y:
		return @"Y";
	case BTN_Z:
		return @"Z";
	case BTN_TL:
		return @"TL";
		return @"L";
	case BTN_TR:
		return @"TR";
		return @"R";
	case BTN_TL2:
		return @"TL2";
		return @"ZL";
	case BTN_TR2:
		return @"TR2";
		return @"ZR";
	case BTN_SELECT:
		return @"Select";
	case BTN_START:
		return @"Start";
	case BTN_MODE:
		return @"Mode";
	case BTN_THUMBL:
210
211
212
213
214
215
216





217
218
219
220
221
222
223
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228







+
+
+
+
+







			if (OFBitSetIsSet(absBits, ABS_HAT0X) &&
			    OFBitSetIsSet(absBits, ABS_HAT0Y)) {
				[_buttons addObject: @"D-Pad Left"];
				[_buttons addObject: @"D-Pad Right"];
				[_buttons addObject: @"D-Pad Up"];
				[_buttons addObject: @"D-Pad Down"];
			}

			if (OFBitSetIsSet(absBits, ABS_Z))
				[_buttons addObject: @"ZL"];
			if (OFBitSetIsSet(absBits, ABS_RZ))
				[_buttons addObject: @"ZR"];
		}

		[_buttons makeImmutable];
	} @catch (id e) {
		[self release];
		@throw e;
	}
319
320
321
322
323
324
325












326
327
328
329
330
331
332
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349







+
+
+
+
+
+
+
+
+
+
+
+







				} else {
					[_pressedButtons removeObject:
					    @"D-Pad Up"];
					[_pressedButtons removeObject:
					    @"D-Pad Down"];
				}
				break;
			case ABS_Z:
				if (event.value > 0)
					[_pressedButtons addObject: @"ZL"];
				else
					[_pressedButtons removeObject: @"ZL"];
				break;
			case ABS_RZ:
				if (event.value > 0)
					[_pressedButtons addObject: @"ZR"];
				else
					[_pressedButtons removeObject: @"ZR"];
				break;
			}

			break;
		}
	}
}