ObjFW  Diff

Differences From Artifact [c19a2f1b59]:

To Artifact [5dde4675ee]:


27
28
29
30
31
32
33


34
35


36
37

38




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

55
56
57
58
59
60
61
27
28
29
30
31
32
33
34
35


36
37
38

39
40
41
42
43
44
45
46

47
48
49



50
51





52
53
54
55
56
57
58
59







+
+
-
-
+
+

-
+

+
+
+
+


-



-
-
-


-
-
-
-
-
+








#define id id_3ds
#include <3ds.h>
#undef id

static OFArray OF_GENERIC(OFGameController *) *controllers;

@implementation OFNintendo3DSGameController
@synthesize leftAnalogStickPosition = _leftAnalogStickPosition;
static void
initControllers(void)

+ (void)initialize
{
	void *pool = objc_autoreleasePoolPush();
	void *pool;

	if (self != [OFNintendo3DSGameController class])
		return;

	pool = objc_autoreleasePoolPush();
	controllers = [[OFArray alloc] initWithObject:
	    [[[OFNintendo3DSGameController alloc] init] autorelease]];

	objc_autoreleasePoolPop(pool);
}

@implementation OFNintendo3DSGameController
@synthesize leftAnalogStickPosition = _leftAnalogStickPosition;

+ (OFArray OF_GENERIC(OFGameController *) *)controllers
{
	static OFOnceControl onceControl = OFOnceControlInitValue;

	OFOnce(&onceControl, initControllers);

	return [[controllers retain] autorelease];
	return controllers;
}

- (instancetype)init
{
	self = [super init];

	@try {