Overview
Comment: | Various cleanups |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
01f1d066bcfb25b0adad6ddcc3bb4231 |
User & Date: | js on 2024-06-09 23:39:13 |
Other Links: | manifest | tags |
Context
2024-06-16
| ||
20:52 | ObjFWHID: Move Wiimote profile to separate files check-in: be1b426a45 user: js tags: trunk | |
2024-06-09
| ||
23:39 | Various cleanups check-in: 01f1d066bc user: js tags: trunk | |
23:24 | ObjFWHID: Add support for Nintendo Switch check-in: e01b5123f1 user: js tags: trunk | |
Changes
Modified src/hid/OHEvdevGameController.h from [428d509e52] to [0dab2fe07e].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 | - + | bool _discardUntilReport; unsigned long *_evBits, *_keyBits, *_absBits; uint16_t _vendorID, _productID; OFString *_name; id <OHGameControllerProfile> _rawProfile; } |
Modified src/hid/OHEvdevGameController.m from [98e64f1a03] to [548d505db7].
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - - + + | @interface OHEvdevGameControllerProfile: OFObject <OHGameControllerProfile> { OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *_buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerAxis *) *_axes; } |
︙ | |||
420 421 422 423 424 425 426 | 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | - + | if (![device hasPrefix: @"event"]) continue; path = [@"/dev/input" stringByAppendingPathComponent: device]; @try { controller = [[[OHEvdevGameController alloc] |
︙ | |||
442 443 444 445 446 447 448 | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | - + | [controllers makeImmutable]; objc_autoreleasePoolPop(pool); return controllers; } |
︙ | |||
550 551 552 553 554 555 556 | 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 | - - + + | [axes setObject: axis forKey: axisName]; } } } [axes makeImmutable]; _rawProfile = [[OHEvdevGameControllerProfile alloc] |
︙ | |||
784 785 786 787 788 789 790 | 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 | - - + + | @implementation OHEvdevGameControllerAxis @end @implementation OHEvdevGameControllerProfile @synthesize buttons = _buttons, axes = _axes; |
︙ |
Modified src/hid/OHNintendo3DSGameController.m from [492047b1e9] to [6bc450a66c].
︙ | |||
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | 78 79 80 81 82 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 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | + + + + + + - - - - - - - - - - + + + + + + + + + + + - - - + + + + + - - + + - - - - + + + + + + | [_extendedGamepad release]; [super dealloc]; } - (void)retrieveState { void *pool = objc_autoreleasePoolPush(); OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *buttons = _extendedGamepad.buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerDirectionalPad *) *directionalPads = _extendedGamepad.directionalPads; u32 keys; circlePosition leftPos, rightPos; OHGameControllerDirectionalPad *directionalPad; hidScanInput(); keys = hidKeysHeld(); hidCircleRead(&leftPos); hidCstickRead(&rightPos); |
︙ |
Modified src/hid/OHNintendoSwitchGameController.h from [776eb7110c] to [ed7820b3e1].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + | OF_ASSUME_NONNULL_BEGIN @class OHNintendoSwitchExtendedGamepad; @interface OHNintendoSwitchGameController: OHGameController { |
Modified src/hid/OHNintendoSwitchGameController.m from [2ac5ac1c04] to [2baa5a5492].
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + - + - - + | } - (instancetype)initWithIndex: (size_t)index { self = [super init]; @try { |
︙ | |||
111 112 113 114 115 116 117 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | - - + + - + - + | *buttons = _extendedGamepad.buttons; OFDictionary OF_GENERIC(OFString *, OHGameControllerDirectionalPad *) *directionalPads = _extendedGamepad.directionalPads; u64 keys; HidAnalogStickState stick; OHGameControllerDirectionalPad *directionalPad; |
︙ |
Modified src/hid/OHXInputGameController.h from [ad658e8625] to [2ab30cd6c3].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + | @interface OHXInputGameController: OHGameController { DWORD _index; OFNumber *_Nullable _vendorID, *_Nullable _productID; OHXInputExtendedGamepad *_extendedGamepad; } |
︙ |
Modified src/hid/OHXInputGameController.m from [fe788fd33d] to [cf9b9c985f].
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + - + | void *pool = objc_autoreleasePoolPush(); for (DWORD i = 0; i < XUSER_MAX_COUNT; i++) { OHGameController *controller; @try { controller = [[[OHXInputGameController alloc] |
︙ |
Modified tests/gamecontroller/GameControllerTests.m from [aae21c76af] to [c3617c1d54].
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - - | - (void)applicationDidFinishLaunching: (OFNotification *)notification { #if defined(OF_WII) || defined(OF_NINTENDO_DS) || defined(OF_NINTENDO_3DS) [OFStdIOStream setUpConsole]; #endif #if defined(OF_NINTENDO_SWITCH) consoleInit(NULL); |
︙ |