ObjFW  Diff

Differences From Artifact [ab4d725506]:

To Artifact [c19a2f1b59]:


122
123
124
125
126
127
128
129









130
131
132
133
134
135
136
137
138
139
		[_pressedButtons addObject: OFGameControllerCPadUpButton];
	if (keys & KEY_CSTICK_DOWN)
		[_pressedButtons addObject: OFGameControllerCPadDownButton];
	if (keys & KEY_CSTICK_LEFT)
		[_pressedButtons addObject: OFGameControllerCPadLeftButton];
	if (keys & KEY_CSTICK_RIGHT)
		[_pressedButtons addObject: OFGameControllerCPadRightButton];










	_leftAnalogStickPosition = OFMakePoint(
	    (float)pos.dx / (pos.dx < 0 ? -INT16_MIN : INT16_MAX),
	    (float)pos.dy / (pos.dy < 0 ? -INT16_MIN : INT16_MAX));
}

- (OFString *)name
{
	return @"Nintendo 3DS";
}









>
>
>
>
>
>
>
>
>

|
<







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140

141
142
143
144
145
146
147
		[_pressedButtons addObject: OFGameControllerCPadUpButton];
	if (keys & KEY_CSTICK_DOWN)
		[_pressedButtons addObject: OFGameControllerCPadDownButton];
	if (keys & KEY_CSTICK_LEFT)
		[_pressedButtons addObject: OFGameControllerCPadLeftButton];
	if (keys & KEY_CSTICK_RIGHT)
		[_pressedButtons addObject: OFGameControllerCPadRightButton];

	if (pos.dx > 150)
		pos.dx = 150;
	if (pos.dx < -150)
		pos.dx = -150;
	if (pos.dy > 150)
		pos.dy = 150;
	if (pos.dy < -150)
		pos.dy = -150;

	_leftAnalogStickPosition = OFMakePoint(
	    (float)pos.dx / 150, -(float)pos.dy / 150);

}

- (OFString *)name
{
	return @"Nintendo 3DS";
}