ObjFW  Diff

Differences From Artifact [e8178e5420]:

To Artifact [ca937bebcc]:


18
19
20
21
22
23
24


25
26
27

28
29
30
31
32
33
34
 */

#include "config.h"

#import "OHNintendoDSGameController.h"
#import "OFArray.h"
#import "OFDictionary.h"


#import "OHGameControllerButton.h"
#import "OHGameControllerDirectionalPad.h"
#import "OHNintendoDSGamepad.h"


#import "OFInitializationFailedException.h"
#import "OFReadFailedException.h"

#define asm __asm__
#include <nds.h>
#undef asm







>
>



>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 */

#include "config.h"

#import "OHNintendoDSGameController.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OHGameController.h"
#import "OHGameController+Private.h"
#import "OHGameControllerButton.h"
#import "OHGameControllerDirectionalPad.h"
#import "OHNintendoDSGamepad.h"
#import "OHNintendoDSGamepad+Private.h"

#import "OFInitializationFailedException.h"
#import "OFReadFailedException.h"

#define asm __asm__
#include <nds.h>
#undef asm
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
	void *pool;

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

	pool = objc_autoreleasePoolPush();
	controllers = [[OFArray alloc] initWithObject:
	    [[[OHNintendoDSGameController alloc] init] autorelease]];
	objc_autoreleasePoolPop(pool);
}

+ (OFArray OF_GENERIC(OHGameController *) *)controllers
{
	return controllers;
}

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

	@try {
		_gamepad = [[OHNintendoDSGamepad alloc] init];

		[self updateState];
	} @catch (id e) {
		[self release];
		@throw e;
	}








|








|

|


|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
	void *pool;

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

	pool = objc_autoreleasePoolPush();
	controllers = [[OFArray alloc] initWithObject:
	    [[[OHNintendoDSGameController alloc] oh_init] autorelease]];
	objc_autoreleasePoolPop(pool);
}

+ (OFArray OF_GENERIC(OHGameController *) *)controllers
{
	return controllers;
}

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

	@try {
		_gamepad = [[OHNintendoDSGamepad alloc] oh_init];

		[self updateState];
	} @catch (id e) {
		[self release];
		@throw e;
	}