34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#import "OHGameController.h"
#import "OHGameController+Private.h"
#import "OHGameControllerAxis.h"
#import "OHGameControllerButton.h"
#import "OHGameControllerDirectionalPad.h"
#import "OHJoyConPair.h"
#import "OHJoyConPair+Private.h"
#import "OHSwitchProController.h"
#import "OHSwitchProController+Private.h"
@implementation OHGCFGameController
@synthesize name = _name;
+ (void)initialize
|
>
>
|
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
|
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
profileClass = [OHGCFGameControllerProfile class];
_profile = [[profileClass alloc]
oh_initWithLiveInput: _controller.input.unmappedInput];
objc_autoreleasePoolPop(pool);
|
>
>
|
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);
|