ObjFW  Diff

Differences From Artifact [fae6195d95]:

To Artifact [eb7eb0eaba]:


80
81
82
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
		directionalPad = [[[OHGameControllerDirectionalPad alloc]
		    initWithName: @"D-Pad"
			   xAxis: xAxis
			   yAxis: yAxis] autorelease];
		[directionalPads setObject: directionalPad forKey: @"D-Pad"];

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


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

		objc_autoreleasePoolPop(pool);
	} @catch (id e) {
		[self release];







|

|

|

|

|




|
>







80
81
82
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
		directionalPad = [[[OHGameControllerDirectionalPad alloc]
		    initWithName: @"D-Pad"
			   xAxis: xAxis
			   yAxis: yAxis] autorelease];
		[directionalPads setObject: directionalPad forKey: @"D-Pad"];

		up = [[[OHGameControllerButton alloc]
		    initWithName: @"C-Up"] autorelease];
		down = [[[OHGameControllerButton alloc]
		    initWithName: @"C-Down"] autorelease];
		left = [[[OHGameControllerButton alloc]
		    initWithName: @"C-Left"] autorelease];
		right = [[[OHGameControllerButton alloc]
		    initWithName: @"C-Right"] autorelease];
		directionalPad = [[[OHGameControllerDirectionalPad alloc]
		    initWithName: @"C-Buttons"
			      up: up
			    down: down
			    left: left
			   right: right] autorelease];
		[directionalPads setObject: directionalPad
				    forKey: @"C-Buttons"];

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

		objc_autoreleasePoolPop(pool);
	} @catch (id e) {
		[self release];
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
	case BTN_A:
		return [_buttons objectForKey: @"A"];
	case BTN_B:
		return [_buttons objectForKey: @"B"];
	case BTN_TL2:
		return [_buttons objectForKey: @"Z"];
	case BTN_SELECT:
		return [[_directionalPads objectForKey: @"C-Pad"] up];
	case BTN_X:
		return [[_directionalPads objectForKey: @"C-Pad"] down];
	case BTN_Y:
		return [[_directionalPads objectForKey: @"C-Pad"] left];
	case BTN_C:
		return [[_directionalPads objectForKey: @"C-Pad"] right];
	case BTN_TL:
		return [_buttons objectForKey: @"L"];
	case BTN_TR:
		return [_buttons objectForKey: @"R"];
	case BTN_START:
		return [_buttons objectForKey: @"Start"];
	}







|

|

|

|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
	case BTN_A:
		return [_buttons objectForKey: @"A"];
	case BTN_B:
		return [_buttons objectForKey: @"B"];
	case BTN_TL2:
		return [_buttons objectForKey: @"Z"];
	case BTN_SELECT:
		return [[_directionalPads objectForKey: @"C-Buttons"] up];
	case BTN_X:
		return [[_directionalPads objectForKey: @"C-Buttons"] down];
	case BTN_Y:
		return [[_directionalPads objectForKey: @"C-Buttons"] left];
	case BTN_C:
		return [[_directionalPads objectForKey: @"C-Buttons"] right];
	case BTN_TL:
		return [_buttons objectForKey: @"L"];
	case BTN_TR:
		return [_buttons objectForKey: @"R"];
	case BTN_START:
		return [_buttons objectForKey: @"Start"];
	}