Differences From Artifact [a788c8cea8]:
- File src/hid/OHNintendoSwitchGameController.m — part of check-in [ddaa4f35d0] at 2024-06-17 00:37:04 on branch trunk — ObjFWHID: Make profiles implementation independent (user: js, size: 5034) [annotate] [blame] [check-ins using]
To Artifact [6bf69b44e2]:
- File src/hid/OHNintendoSwitchGameController.m — part of check-in [23e3ffff7a] at 2024-10-22 22:29:41 on branch trunk — -[OHGameController {retrieve -> update}State] (user: js, size: 5030) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
83 84 85 86 87 88 89 | if (!padIsConnected(&_pad)) @throw [OFInitializationFailedException exceptionWithClass: self.class]; _extendedGamepad = [[OHNintendoSwitchExtendedGamepad alloc] init]; | | | | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | if (!padIsConnected(&_pad)) @throw [OFInitializationFailedException exceptionWithClass: self.class]; _extendedGamepad = [[OHNintendoSwitchExtendedGamepad alloc] init]; [self updateState]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_extendedGamepad release]; [super dealloc]; } - (void)updateState { void *pool = objc_autoreleasePoolPush(); OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *buttons = _extendedGamepad.buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerDirectionalPad *) *directionalPads = _extendedGamepad.directionalPads; u64 keys; |
︙ | ︙ |