ObjFW  Diff

Differences From Artifact [4438c4bc5d]:

To Artifact [254b2085d9]:


39
40
41
42
43
44
45
46

47
48
49
50
51
52
53
54
39
40
41
42
43
44
45

46

47
48
49
50
51
52
53







-
+
-







	@try {
		void *pool = objc_autoreleasePoolPush();
		OFMutableDictionary *buttons =
		    [OFMutableDictionary dictionaryWithCapacity: numButtons];
		OFMutableDictionary *directionalPads;
		OHGameControllerAxis *xAxis, *yAxis;
		OHGameControllerDirectionalPad *directionalPad;
		OHGameControllerButton *upButton, *downButton;
		OHGameControllerButton *up, *down, *left, *right;
		OHGameControllerButton *leftButton, *rightButton;

		for (size_t i = 0; i < numButtons; i++) {
			OHGameControllerButton *button =
			    [[OHGameControllerButton alloc]
			    initWithName: buttonNames[i]];

			@try {
84
85
86
87
88
89
90
91

92
93

94
95

96
97

98
99
100
101
102
103
104




105
106
107
108
109
110
111
83
84
85
86
87
88
89

90
91

92
93

94
95

96
97
98
99




100
101
102
103
104
105
106
107
108
109
110







-
+

-
+

-
+

-
+



-
-
-
-
+
+
+
+







		directionalPad = [[[OHGameControllerDirectionalPad alloc]
		    initWithName: @"Right Thumbstick"
			   xAxis: xAxis
			   yAxis: yAxis] autorelease];
		[directionalPads setObject: directionalPad
				    forKey: @"Right Thumbstick"];

		upButton = [[[OHGameControllerButton alloc]
		up = [[[OHGameControllerButton alloc]
		    initWithName: @"D-Pad Up"] autorelease];
		downButton = [[[OHGameControllerButton alloc]
		down = [[[OHGameControllerButton alloc]
		    initWithName: @"D-Pad Down"] autorelease];
		leftButton = [[[OHGameControllerButton alloc]
		left = [[[OHGameControllerButton alloc]
		    initWithName: @"D-Pad Left"] autorelease];
		rightButton = [[[OHGameControllerButton alloc]
		right = [[[OHGameControllerButton alloc]
		    initWithName: @"D-Pad Right"] autorelease];
		directionalPad = [[[OHGameControllerDirectionalPad alloc]
		    initWithName: @"D-Pad"
			upButton: upButton
		      downButton: downButton
		      leftButton: leftButton
		     rightButton: rightButton] autorelease];
			      up: up
			    down: down
			    left: left
			   right: right] autorelease];
		[directionalPads setObject: directionalPad forKey: @"D-Pad"];

		[directionalPads makeImmutable];
		_directionalPads = [directionalPads retain];

		objc_autoreleasePoolPop(pool);
	} @catch (id e) {