Rev 1 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1 | Rev 8 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /* | 1 | /* | 
| 2 |   Simple DirectMedia Layer | 2 |   Simple DirectMedia Layer | 
| 3 |   Copyright (C) 1997- | 3 |   Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> | 
| 4 | 4 | ||
| 5 |   This software is provided 'as-is', without any express or implied | 5 |   This software is provided 'as-is', without any express or implied | 
| 6 |   warranty.  In no event will the authors be held liable for any damages | 6 |   warranty.  In no event will the authors be held liable for any damages | 
| 7 |   arising from the use of this software. | 7 |   arising from the use of this software. | 
| 8 | 8 | ||
| Line 114... | Line 114... | ||
| 114 | #include "begin_code.h" | 114 | #include "begin_code.h" | 
| 115 | /* Set up for C function definitions, even when using C++ */ | 115 | /* Set up for C function definitions, even when using C++ */ | 
| 116 | #ifdef __cplusplus | 116 | #ifdef __cplusplus | 
| 117 | extern "C" { | 117 | extern "C" { | 
| 118 | #endif /* __cplusplus */ | 118 | #endif /* __cplusplus */ | 
| - | 119 | ||
| - | 120 | /* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF). | |
| - | 121 |  * | |
| - | 122 |  * At the moment the magnitude variables are mixed between signed/unsigned, and | |
| - | 123 |  * it is also not made clear that ALL of those variables expect a max of 0x7FFF. | |
| - | 124 |  * | |
| - | 125 |  * Some platforms may have higher precision than that (Linux FF, Windows XInput) | |
| - | 126 |  * so we should fix the inconsistency in favor of higher possible precision, | |
| - | 127 |  * adjusting for platforms that use different scales. | |
| - | 128 |  * -flibit | |
| - | 129 |  */ | |
| 119 | 130 | ||
| 120 | /** | 131 | /** | 
| 121 |  *  \typedef SDL_Haptic | 132 |  *  \typedef SDL_Haptic | 
| 122 |  * | 133 |  * | 
| 123 |  *  \brief The haptic structure used to identify an SDL haptic. | 134 |  *  \brief The haptic structure used to identify an SDL haptic. | 
| Line 654... | Line 665... | ||
| 654 |  * \brief A structure containing a template for a Left/Right effect. | 665 |  * \brief A structure containing a template for a Left/Right effect. | 
| 655 |  * | 666 |  * | 
| 656 |  * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect. | 667 |  * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect. | 
| 657 |  * | 668 |  * | 
| 658 |  * The Left/Right effect is used to explicitly control the large and small | 669 |  * The Left/Right effect is used to explicitly control the large and small | 
| 659 |  * motors, commonly found in modern game controllers.  | 670 |  * motors, commonly found in modern game controllers. The small (right) motor | 
| 660 |  * frequency, the  | 671 |  * is high frequency, and the large (left) motor is low frequency. | 
| 661 |  * | 672 |  * | 
| 662 |  * \sa SDL_HAPTIC_LEFTRIGHT | 673 |  * \sa SDL_HAPTIC_LEFTRIGHT | 
| 663 |  * \sa SDL_HapticEffect | 674 |  * \sa SDL_HapticEffect | 
| 664 |  */ | 675 |  */ | 
| 665 | typedef struct SDL_HapticLeftRight | 676 | typedef struct SDL_HapticLeftRight | 
| 666 | { | 677 | { | 
| 667 |     /* Header */ | 678 |     /* Header */ | 
| 668 | Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */ | 679 | Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */ | 
| 669 | 680 | ||
| 670 |     /* Replay */ | 681 |     /* Replay */ | 
| 671 | Uint32 length; /**< Duration of the effect. */ | 682 | Uint32 length; /**< Duration of the effect in milliseconds. */ | 
| 672 | 683 | ||
| 673 |     /* Rumble */ | 684 |     /* Rumble */ | 
| 674 | Uint16 large_magnitude; /**< Control of the large controller motor. */ | 685 | Uint16 large_magnitude; /**< Control of the large controller motor. */ | 
| 675 | Uint16 small_magnitude; /**< Control of the small controller motor. */ | 686 | Uint16 small_magnitude; /**< Control of the small controller motor. */ | 
| 676 | } SDL_HapticLeftRight; | 687 | } SDL_HapticLeftRight; |