ObjFW  Check-in [be7f15e75f]

Overview
Comment:OHN64Controller: Rename C-Pad to C-Buttons
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: be7f15e75f1b15bae922d6f6754a3e0117f76db5aef1f94e0932f91edc8c15e0
User & Date: js on 2024-06-18 22:15:42
Other Links: manifest | tags
Context
2024-06-23
22:04
runtime: Properly hide symbols Leaf check-in: a38d711e37 user: js tags: trunk
2024-06-18
22:15
OHN64Controller: Rename C-Pad to C-Buttons check-in: be7f15e75f user: js tags: trunk
22:13
ObjFWHID: Add profile for extended N64 controller check-in: cb71b05d78 user: js tags: trunk
Changes

Modified src/hid/OHN64Controller.m from [fae6195d95] to [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
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-Pad Up"] autorelease];
		    initWithName: @"C-Up"] autorelease];
		down = [[[OHGameControllerButton alloc]
		    initWithName: @"C-Pad Down"] autorelease];
		    initWithName: @"C-Down"] autorelease];
		left = [[[OHGameControllerButton alloc]
		    initWithName: @"C-Pad Left"] autorelease];
		    initWithName: @"C-Left"] autorelease];
		right = [[[OHGameControllerButton alloc]
		    initWithName: @"C-Pad Right"] autorelease];
		    initWithName: @"C-Right"] autorelease];
		directionalPad = [[[OHGameControllerDirectionalPad alloc]
		    initWithName: @"C-Pad"
		    initWithName: @"C-Buttons"
			      up: up
			    down: down
			    left: left
			   right: right] autorelease];
		[directionalPads setObject: directionalPad forKey: @"C-Pad"];
		[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
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-Pad"] up];
		return [[_directionalPads objectForKey: @"C-Buttons"] up];
	case BTN_X:
		return [[_directionalPads objectForKey: @"C-Pad"] down];
		return [[_directionalPads objectForKey: @"C-Buttons"] down];
	case BTN_Y:
		return [[_directionalPads objectForKey: @"C-Pad"] left];
		return [[_directionalPads objectForKey: @"C-Buttons"] left];
	case BTN_C:
		return [[_directionalPads objectForKey: @"C-Pad"] right];
		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"];
	}