ObjFW  Diff

Differences From Artifact [3a9557bf71]:

  • File src/hid/OHGCFGameController.m — part of check-in [0eda771525] at 2025-01-03 18:39:56 on branch trunk — ObjFWHID: Support DualShock 4 via GCF (user: js size: 4691)

To Artifact [1983894100]:

  • File src/hid/OHGCFGameController.m — part of check-in [8192212937] at 2025-01-03 20:55:00 on branch trunk — ObjFWHID: 8Bitdo NES30 GamePad support for GCF (user: js size: 4842)

34
35
36
37
38
39
40


41
42
43
44
45
46
47
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49







+
+







#import "OHGameController.h"
#import "OHGameController+Private.h"
#import "OHGameControllerAxis.h"
#import "OHGameControllerButton.h"
#import "OHGameControllerDirectionalPad.h"
#import "OHJoyConPair.h"
#import "OHJoyConPair+Private.h"
#import "OHNESGamepad.h"
#import "OHNESGamepad+Private.h"
#import "OHSwitchProController.h"
#import "OHSwitchProController+Private.h"

@implementation OHGCFGameController
@synthesize name = _name;

+ (void)initialize
86
87
88
89
90
91
92


93
94
95
96
97
98
99
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103







+
+







			profileClass = [OHDualSenseGamepad class];
		else if ([_name isEqual: @"DUALSHOCK 4 Wireless Controller"])
			profileClass = [OHDualShock4Gamepad class];
		else if ([_name isEqual: @"Joy-Con (L/R)"])
			profileClass = [OHJoyConPair class];
		else if ([_name isEqual: @"Pro Controller"])
			profileClass = [OHSwitchProController class];
		else if ([_name isEqual: @"8Bitdo NES30 GamePad"])
			profileClass = [OHNESGamepad class];
		else
			profileClass = [OHGCFGameControllerProfile class];

		_profile = [[profileClass alloc]
		    oh_initWithLiveInput: _controller.input.unmappedInput];

		objc_autoreleasePoolPop(pool);