Overview
Comment: | ObjFWHID: Ignore Guide button on XInput 9.1.0 |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
256c4a696fc07baae81664ac77625ff6 |
User & Date: | js on 2024-06-08 19:36:39 |
Other Links: | manifest | tags |
Context
2024-06-08
| ||
19:38 | OHXInputGamepad: Fix missed rename check-in: 7be631239e user: js tags: trunk | |
19:36 | ObjFWHID: Ignore Guide button on XInput 9.1.0 check-in: 256c4a696f user: js tags: trunk | |
19:32 | OHGameControllerDirectionalPad: Rename methods check-in: 35e4d04158 user: js tags: trunk | |
Changes
Modified src/hid/OHXInputGameController.h from [9cb565dbba] to [2da83182e9].
︙ | |||
30 31 32 33 34 35 36 37 38 39 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + + + + + + + | DWORD _index; OFNumber *_Nullable _vendorID, *_Nullable _productID; OHXInputGamepad *_gamepad; } - (instancetype)oh_initWithIndex: (DWORD)index OF_METHOD_FAMILY(init); @end #ifdef __cplusplus extern "C" { #endif extern int OHXInputVersion; #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END |
Modified src/hid/OHXInputGameController.m from [4922b1a2cf] to [c422cbe7b4].
︙ | |||
42 43 44 45 46 47 48 49 50 51 | 42 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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | + - - + - + - + | WORD vendorID; WORD productID; WORD versionNumber; WORD unknown1; DWORD unknown2; }; int OHXInputVersion; static WINAPI DWORD (*XInputGetStateFuncPtr)(DWORD, XINPUT_STATE *); static WINAPI DWORD (*XInputGetCapabilitiesExFuncPtr)(DWORD, DWORD, DWORD, struct XInputCapabilitiesEx *); |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + | !!(state.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB); _gamepad.rightThumbstickButton.value = !!(state.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB); _gamepad.menuButton.value = !!(state.Gamepad.wButtons & XINPUT_GAMEPAD_START); _gamepad.optionsButton.value = !!(state.Gamepad.wButtons & XINPUT_GAMEPAD_BACK); |
︙ | |||
219 220 221 222 223 224 225 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + | !!(state.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_LEFT); _gamepad.dPad.right.value = !!(state.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_RIGHT); } - (OFString *)name { |
︙ |
Modified src/hid/OHXInputGamepad.m from [254b2085d9] to [3ff2d7703f].
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + | #include "config.h" #import "OHXInputGamepad.h" #import "OFDictionary.h" #import "OHGameControllerAxis.h" #import "OHGameControllerButton.h" #import "OHGameControllerDirectionalPad.h" #import "OHXInputGameController.h" static OFString *const buttonNames[] = { @"A", @"B", @"X", @"Y", @"LB", @"RB", @"LT", @"RT", @"LSB", @"RSB", @"Start", @"Back", @"Guide" }; static const size_t numButtons = sizeof(buttonNames) / sizeof(*buttonNames); |
︙ | |||
42 43 44 45 46 47 48 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - - + + + + + + + - | [OFMutableDictionary dictionaryWithCapacity: numButtons]; OFMutableDictionary *directionalPads; OHGameControllerAxis *xAxis, *yAxis; OHGameControllerDirectionalPad *directionalPad; OHGameControllerButton *up, *down, *left, *right; for (size_t i = 0; i < numButtons; i++) { |
︙ |