Differences From Artifact [6f8baafc94]:
- File
src/OFGameController.h
— part of check-in
[0f902d87eb]
at
2024-05-09 23:41:48
on branch gamecontroller
— OFGameController: Retrieve state explicitly
This avoids retrieving it multiple times when reading multiple things. (user: js, size: 7832) [annotate] [blame] [check-ins using]
To Artifact [1c2cd608b4]:
- File
src/OFGameController.h
— part of check-in
[22f6f258d8]
at
2024-05-10 00:27:25
on branch gamecontroller
— OFGameController: Add support for Windows
As this is using XInput 1.3, only XInput-compatible devices are supported. (user: js, size: 8076) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
208 209 210 211 212 213 214 215 216 217 218 219 220 221 | int32_t _rightAnalogStickMinY, _rightAnalogStickMaxY; int32_t _ZLMinPressure, _ZLMaxPressure, _ZRMinPressure, _ZRMaxPressure; #elif defined(OF_NINTENDO_DS) OFMutableSet *_pressedButtons; #elif defined(OF_NINTENDO_3DS) OFMutableSet *_pressedButtons; OFPoint _leftAnalogStickPosition; #endif } #ifdef OF_HAVE_CLASS_PROPERTIES @property (class, readonly, nonatomic) OFArray <OFGameController *> *controllers; #endif | > > > > > | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | int32_t _rightAnalogStickMinY, _rightAnalogStickMaxY; int32_t _ZLMinPressure, _ZLMaxPressure, _ZRMinPressure, _ZRMaxPressure; #elif defined(OF_NINTENDO_DS) OFMutableSet *_pressedButtons; #elif defined(OF_NINTENDO_3DS) OFMutableSet *_pressedButtons; OFPoint _leftAnalogStickPosition; #elif defined(OF_WINDOWS) DWORD _index; OFMutableSet *_pressedButtons; OFPoint _leftAnalogStickPosition, _rightAnalogStickPosition; float _ZLPressure, _ZRPressure; #endif } #ifdef OF_HAVE_CLASS_PROPERTIES @property (class, readonly, nonatomic) OFArray <OFGameController *> *controllers; #endif |
︙ | ︙ | |||
271 272 273 274 275 276 277 278 279 280 281 282 283 284 | - (instancetype)init OF_UNAVAILABLE; /** * @brief Retrieve the current state from the game controller. * * The state returned by @ref OFGameController's messages does not change until * this method is called. */ - (void)retrieveState; /** * @brief Returns how hard the specified button is pressed. * * The returned value is in the range from 0 to 1. | > > | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | - (instancetype)init OF_UNAVAILABLE; /** * @brief Retrieve the current state from the game controller. * * The state returned by @ref OFGameController's messages does not change until * this method is called. * * @throw OFReadFailedException The controller's state could not be read */ - (void)retrieveState; /** * @brief Returns how hard the specified button is pressed. * * The returned value is in the range from 0 to 1. |
︙ | ︙ |