gosu 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/dependencies/SDL/include/SDL.h +108 -14
  3. data/dependencies/SDL/include/SDL_assert.h +81 -50
  4. data/dependencies/SDL/include/SDL_atomic.h +135 -35
  5. data/dependencies/SDL/include/SDL_audio.h +960 -355
  6. data/dependencies/SDL/include/SDL_bits.h +11 -6
  7. data/dependencies/SDL/include/SDL_blendmode.h +91 -14
  8. data/dependencies/SDL/include/SDL_clipboard.h +30 -7
  9. data/dependencies/SDL/include/SDL_config.h +277 -27
  10. data/dependencies/SDL/include/SDL_config_android.h +13 -38
  11. data/dependencies/SDL/include/SDL_config_iphoneos.h +21 -62
  12. data/dependencies/SDL/include/SDL_config_macosx.h +23 -92
  13. data/dependencies/SDL/include/SDL_config_minimal.h +1 -4
  14. data/dependencies/SDL/include/SDL_config_pandora.h +15 -22
  15. data/dependencies/SDL/include/SDL_config_psp.h +16 -37
  16. data/dependencies/SDL/include/SDL_config_windows.h +28 -91
  17. data/dependencies/SDL/include/SDL_config_winrt.h +33 -61
  18. data/dependencies/SDL/include/SDL_config_wiz.h +28 -56
  19. data/dependencies/SDL/include/SDL_copying.h +1 -1
  20. data/dependencies/SDL/include/SDL_cpuinfo.h +331 -71
  21. data/dependencies/SDL/include/SDL_egl.h +906 -280
  22. data/dependencies/SDL/include/SDL_endian.h +101 -47
  23. data/dependencies/SDL/include/SDL_error.h +70 -19
  24. data/dependencies/SDL/include/SDL_events.h +387 -79
  25. data/dependencies/SDL/include/SDL_filesystem.h +73 -64
  26. data/dependencies/SDL/include/SDL_gamecontroller.h +585 -125
  27. data/dependencies/SDL/include/SDL_gesture.h +36 -6
  28. data/dependencies/SDL/include/SDL_haptic.h +304 -210
  29. data/dependencies/SDL/include/SDL_hidapi.h +451 -0
  30. data/dependencies/SDL/include/SDL_hints.h +1286 -897
  31. data/dependencies/SDL/include/SDL_joystick.h +577 -130
  32. data/dependencies/SDL/include/SDL_keyboard.h +162 -63
  33. data/dependencies/SDL/include/SDL_keycode.h +7 -5
  34. data/dependencies/SDL/include/SDL_loadso.h +42 -8
  35. data/dependencies/SDL/include/SDL_locale.h +34 -32
  36. data/dependencies/SDL/include/SDL_log.h +212 -19
  37. data/dependencies/SDL/include/SDL_main.h +72 -17
  38. data/dependencies/SDL/include/SDL_messagebox.h +70 -23
  39. data/dependencies/SDL/include/SDL_metal.h +27 -32
  40. data/dependencies/SDL/include/SDL_misc.h +19 -15
  41. data/dependencies/SDL/include/SDL_mouse.h +262 -110
  42. data/dependencies/SDL/include/SDL_mutex.h +286 -66
  43. data/dependencies/SDL/include/SDL_name.h +1 -1
  44. data/dependencies/SDL/include/SDL_opengl.h +1 -1
  45. data/dependencies/SDL/include/SDL_opengles.h +1 -1
  46. data/dependencies/SDL/include/SDL_opengles2.h +2 -2
  47. data/dependencies/SDL/include/SDL_pixels.h +199 -34
  48. data/dependencies/SDL/include/SDL_platform.h +39 -2
  49. data/dependencies/SDL/include/SDL_power.h +23 -10
  50. data/dependencies/SDL/include/SDL_quit.h +1 -1
  51. data/dependencies/SDL/include/SDL_rect.h +78 -28
  52. data/dependencies/SDL/include/SDL_render.h +1204 -472
  53. data/dependencies/SDL/include/SDL_revision.h +2 -2
  54. data/dependencies/SDL/include/SDL_rwops.h +605 -33
  55. data/dependencies/SDL/include/SDL_scancode.h +1 -1
  56. data/dependencies/SDL/include/SDL_sensor.h +76 -42
  57. data/dependencies/SDL/include/SDL_shape.h +38 -27
  58. data/dependencies/SDL/include/SDL_stdinc.h +96 -24
  59. data/dependencies/SDL/include/SDL_surface.h +571 -139
  60. data/dependencies/SDL/include/SDL_system.h +339 -101
  61. data/dependencies/SDL/include/SDL_syswm.h +50 -20
  62. data/dependencies/SDL/include/SDL_test.h +1 -1
  63. data/dependencies/SDL/include/SDL_test_assert.h +2 -2
  64. data/dependencies/SDL/include/SDL_test_common.h +23 -6
  65. data/dependencies/SDL/include/SDL_test_compare.h +1 -1
  66. data/dependencies/SDL/include/SDL_test_crc32.h +1 -1
  67. data/dependencies/SDL/include/SDL_test_font.h +3 -3
  68. data/dependencies/SDL/include/SDL_test_fuzzer.h +28 -26
  69. data/dependencies/SDL/include/SDL_test_harness.h +6 -6
  70. data/dependencies/SDL/include/SDL_test_images.h +1 -1
  71. data/dependencies/SDL/include/SDL_test_log.h +1 -1
  72. data/dependencies/SDL/include/SDL_test_md5.h +1 -1
  73. data/dependencies/SDL/include/SDL_test_memory.h +1 -1
  74. data/dependencies/SDL/include/SDL_test_random.h +2 -2
  75. data/dependencies/SDL/include/SDL_thread.h +226 -128
  76. data/dependencies/SDL/include/SDL_timer.h +129 -22
  77. data/dependencies/SDL/include/SDL_touch.h +48 -8
  78. data/dependencies/SDL/include/SDL_types.h +1 -1
  79. data/dependencies/SDL/include/SDL_version.h +72 -46
  80. data/dependencies/SDL/include/SDL_video.h +1266 -460
  81. data/dependencies/SDL/include/SDL_vulkan.h +100 -161
  82. data/dependencies/SDL/include/begin_code.h +22 -1
  83. data/dependencies/SDL/include/close_code.h +1 -1
  84. data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
  85. data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
  86. data/dependencies/SDL_sound/SDL_sound.c +83 -7
  87. data/dependencies/SDL_sound/SDL_sound.h +4 -4
  88. data/dependencies/SDL_sound/SDL_sound_aiff.c +9 -12
  89. data/dependencies/SDL_sound/SDL_sound_au.c +7 -7
  90. data/dependencies/SDL_sound/SDL_sound_coreaudio.c +3 -3
  91. data/dependencies/SDL_sound/SDL_sound_flac.c +1 -1
  92. data/dependencies/SDL_sound/SDL_sound_internal.h +17 -10
  93. data/dependencies/SDL_sound/SDL_sound_modplug.c +25 -27
  94. data/dependencies/SDL_sound/SDL_sound_mp3.c +5 -17
  95. data/dependencies/SDL_sound/SDL_sound_raw.c +11 -11
  96. data/dependencies/SDL_sound/SDL_sound_shn.c +8 -7
  97. data/dependencies/SDL_sound/SDL_sound_voc.c +6 -4
  98. data/dependencies/SDL_sound/SDL_sound_vorbis.c +6 -11
  99. data/dependencies/SDL_sound/SDL_sound_wav.c +35 -29
  100. data/dependencies/SDL_sound/dr_flac.h +618 -220
  101. data/dependencies/SDL_sound/dr_mp3.h +263 -94
  102. data/dependencies/SDL_sound/libmodplug/fastmix.c +58 -64
  103. data/dependencies/SDL_sound/libmodplug/libmodplug.h +25 -103
  104. data/dependencies/SDL_sound/libmodplug/load_669.c +14 -17
  105. data/dependencies/SDL_sound/libmodplug/load_amf.c +11 -7
  106. data/dependencies/SDL_sound/libmodplug/load_ams.c +65 -22
  107. data/dependencies/SDL_sound/libmodplug/load_dbm.c +8 -4
  108. data/dependencies/SDL_sound/libmodplug/load_dmf.c +55 -25
  109. data/dependencies/SDL_sound/libmodplug/load_far.c +9 -13
  110. data/dependencies/SDL_sound/libmodplug/load_gdm.c +448 -0
  111. data/dependencies/SDL_sound/libmodplug/load_it.c +45 -49
  112. data/dependencies/SDL_sound/libmodplug/load_mdl.c +80 -53
  113. data/dependencies/SDL_sound/libmodplug/load_med.c +20 -12
  114. data/dependencies/SDL_sound/libmodplug/load_mod.c +40 -15
  115. data/dependencies/SDL_sound/libmodplug/load_mt2.c +29 -17
  116. data/dependencies/SDL_sound/libmodplug/load_okt.c +12 -8
  117. data/dependencies/SDL_sound/libmodplug/load_psm.c +101 -78
  118. data/dependencies/SDL_sound/libmodplug/load_ptm.c +18 -17
  119. data/dependencies/SDL_sound/libmodplug/load_s3m.c +9 -7
  120. data/dependencies/SDL_sound/libmodplug/load_stm.c +3 -2
  121. data/dependencies/SDL_sound/libmodplug/load_ult.c +2 -2
  122. data/dependencies/SDL_sound/libmodplug/load_umx.c +315 -35
  123. data/dependencies/SDL_sound/libmodplug/load_xm.c +25 -21
  124. data/dependencies/SDL_sound/libmodplug/mmcmp.c +295 -149
  125. data/dependencies/SDL_sound/libmodplug/modplug.c +7 -123
  126. data/dependencies/SDL_sound/libmodplug/modplug.h +32 -29
  127. data/dependencies/SDL_sound/libmodplug/snd_dsp.c +0 -1
  128. data/dependencies/SDL_sound/libmodplug/snd_flt.c +2 -2
  129. data/dependencies/SDL_sound/libmodplug/snd_fx.c +24 -18
  130. data/dependencies/SDL_sound/libmodplug/sndfile.c +55 -156
  131. data/dependencies/SDL_sound/libmodplug/sndmix.c +7 -12
  132. data/dependencies/SDL_sound/libmodplug/tables.h +10 -15
  133. data/dependencies/SDL_sound/stb_vorbis.h +508 -325
  134. data/dependencies/{al_soft → mojoAL}/AL/al.h +38 -30
  135. data/dependencies/{al_soft → mojoAL}/AL/alc.h +27 -56
  136. data/dependencies/mojoAL/mojoal.c +4594 -0
  137. data/ext/gosu/extconf.rb +29 -30
  138. data/include/Gosu/Audio.hpp +70 -85
  139. data/include/Gosu/Color.hpp +19 -11
  140. data/include/Gosu/Font.hpp +40 -44
  141. data/include/Gosu/Graphics.hpp +58 -71
  142. data/include/Gosu/GraphicsBase.hpp +26 -33
  143. data/include/Gosu/Image.hpp +56 -62
  144. data/include/Gosu/ImageData.hpp +23 -27
  145. data/include/Gosu/Inspection.hpp +1 -4
  146. data/include/Gosu/TextInput.hpp +34 -40
  147. data/include/Gosu/Version.hpp +1 -1
  148. data/include/Gosu/Window.hpp +71 -70
  149. data/lib/SDL2.dll +0 -0
  150. data/lib/gosu/compat.rb +24 -37
  151. data/lib/gosu.rb +2 -2
  152. data/lib64/SDL2.dll +0 -0
  153. data/src/Audio.cpp +86 -86
  154. data/src/AudioFile.hpp +6 -6
  155. data/src/AudioFileAudioToolbox.cpp +1 -1
  156. data/src/AudioFileSDLSound.cpp +1 -1
  157. data/src/AudioImpl.hpp +5 -5
  158. data/src/BitmapIO.cpp +0 -20
  159. data/src/BlockAllocator.cpp +2 -1
  160. data/src/Channel.cpp +22 -20
  161. data/src/Color.cpp +12 -9
  162. data/src/EmptyImageData.hpp +15 -17
  163. data/src/FileUnix.cpp +1 -1
  164. data/src/FileWin.cpp +1 -1
  165. data/src/Font.cpp +48 -53
  166. data/src/Graphics.cpp +135 -143
  167. data/src/Image.cpp +41 -42
  168. data/src/Input.cpp +1 -1
  169. data/src/InputUIKit.cpp +1 -1
  170. data/src/LargeImageData.cpp +108 -101
  171. data/src/LargeImageData.hpp +17 -15
  172. data/src/Log.hpp +6 -6
  173. data/src/Macro.cpp +35 -37
  174. data/src/Macro.hpp +11 -11
  175. data/src/Math.cpp +8 -1
  176. data/src/Resolution.cpp +12 -7
  177. data/src/RubyGosu.cxx +5 -5
  178. data/src/TexChunk.cpp +50 -41
  179. data/src/TexChunk.hpp +22 -22
  180. data/src/Text.cpp +37 -37
  181. data/src/TextBuilder.cpp +60 -57
  182. data/src/TextBuilder.hpp +20 -20
  183. data/src/TextInput.cpp +127 -135
  184. data/src/TrueTypeFont.cpp +107 -107
  185. data/src/TrueTypeFont.hpp +39 -38
  186. data/src/TrueTypeFontApple.cpp +19 -22
  187. data/src/TrueTypeFontUnix.cpp +21 -26
  188. data/src/TrueTypeFontWin.cpp +30 -30
  189. data/src/Window.cpp +95 -86
  190. data/src/WindowUIKit.cpp +46 -49
  191. metadata +7 -17
  192. data/dependencies/SDL/include/SDL_config_os2.h +0 -188
  193. data/dependencies/SDL_sound/libmodplug/load_abc.c +0 -4725
  194. data/dependencies/SDL_sound/libmodplug/load_mid.c +0 -1405
  195. data/dependencies/SDL_sound/libmodplug/load_pat.c +0 -1143
  196. data/dependencies/SDL_sound/libmodplug/load_pat.h +0 -25
  197. data/dependencies/al_soft/AL/alext.h +0 -585
  198. data/dependencies/al_soft/AL/efx-creative.h +0 -3
  199. data/dependencies/al_soft/AL/efx-presets.h +0 -402
  200. data/dependencies/al_soft/AL/efx.h +0 -762
  201. data/dependencies/al_soft/x64/libOpenAL32.dll.a +0 -0
  202. data/dependencies/al_soft/x86/libOpenAL32.dll.a +0 -0
  203. data/lib/OpenAL32.dll +0 -0
  204. data/lib64/OpenAL32.dll +0 -0
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -76,7 +76,7 @@
76
76
  * }
77
77
  *
78
78
  * // Create the effect
79
- * memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
79
+ * SDL_memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
80
80
  * effect.type = SDL_HAPTIC_SINE;
81
81
  * effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
82
82
  * effect.periodic.direction.dir[0] = 18000; // Force comes from south
@@ -820,419 +820,513 @@ typedef union SDL_HapticEffect
820
820
 
821
821
 
822
822
  /* Function prototypes */
823
+
823
824
  /**
824
- * \brief Count the number of haptic devices attached to the system.
825
+ * Count the number of haptic devices attached to the system.
826
+ *
827
+ * \returns the number of haptic devices detected on the system or a negative
828
+ * error code on failure; call SDL_GetError() for more information.
825
829
  *
826
- * \return Number of haptic devices detected on the system.
830
+ * \since This function is available since SDL 2.0.0.
831
+ *
832
+ * \sa SDL_HapticName
827
833
  */
828
834
  extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
829
835
 
830
836
  /**
831
- * \brief Get the implementation dependent name of a haptic device.
837
+ * Get the implementation dependent name of a haptic device.
838
+ *
839
+ * This can be called before any joysticks are opened. If no name can be
840
+ * found, this function returns NULL.
832
841
  *
833
- * This can be called before any joysticks are opened.
834
- * If no name can be found, this function returns NULL.
842
+ * \param device_index index of the device to query.
843
+ * \returns the name of the device or NULL on failure; call SDL_GetError() for
844
+ * more information.
835
845
  *
836
- * \param device_index Index of the device to get its name.
837
- * \return Name of the device or NULL on error.
846
+ * \since This function is available since SDL 2.0.0.
838
847
  *
839
- * \sa SDL_NumHaptics
848
+ * \sa SDL_NumHaptics
840
849
  */
841
850
  extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
842
851
 
843
852
  /**
844
- * \brief Opens a haptic device for use.
853
+ * Open a haptic device for use.
845
854
  *
846
- * The index passed as an argument refers to the N'th haptic device on this
847
- * system.
855
+ * The index passed as an argument refers to the N'th haptic device on this
856
+ * system.
848
857
  *
849
- * When opening a haptic device, its gain will be set to maximum and
850
- * autocenter will be disabled. To modify these values use
851
- * SDL_HapticSetGain() and SDL_HapticSetAutocenter().
858
+ * When opening a haptic device, its gain will be set to maximum and
859
+ * autocenter will be disabled. To modify these values use SDL_HapticSetGain()
860
+ * and SDL_HapticSetAutocenter().
852
861
  *
853
- * \param device_index Index of the device to open.
854
- * \return Device identifier or NULL on error.
862
+ * \param device_index index of the device to open
863
+ * \returns the device identifier or NULL on failure; call SDL_GetError() for
864
+ * more information.
855
865
  *
856
- * \sa SDL_HapticIndex
857
- * \sa SDL_HapticOpenFromMouse
858
- * \sa SDL_HapticOpenFromJoystick
859
- * \sa SDL_HapticClose
860
- * \sa SDL_HapticSetGain
861
- * \sa SDL_HapticSetAutocenter
862
- * \sa SDL_HapticPause
863
- * \sa SDL_HapticStopAll
866
+ * \since This function is available since SDL 2.0.0.
867
+ *
868
+ * \sa SDL_HapticClose
869
+ * \sa SDL_HapticIndex
870
+ * \sa SDL_HapticOpenFromJoystick
871
+ * \sa SDL_HapticOpenFromMouse
872
+ * \sa SDL_HapticPause
873
+ * \sa SDL_HapticSetAutocenter
874
+ * \sa SDL_HapticSetGain
875
+ * \sa SDL_HapticStopAll
864
876
  */
865
877
  extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);
866
878
 
867
879
  /**
868
- * \brief Checks if the haptic device at index has been opened.
880
+ * Check if the haptic device at the designated index has been opened.
869
881
  *
870
- * \param device_index Index to check to see if it has been opened.
871
- * \return 1 if it has been opened or 0 if it hasn't.
882
+ * \param device_index the index of the device to query
883
+ * \returns 1 if it has been opened, 0 if it hasn't or on failure; call
884
+ * SDL_GetError() for more information.
872
885
  *
873
- * \sa SDL_HapticOpen
874
- * \sa SDL_HapticIndex
886
+ * \since This function is available since SDL 2.0.0.
887
+ *
888
+ * \sa SDL_HapticIndex
889
+ * \sa SDL_HapticOpen
875
890
  */
876
891
  extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
877
892
 
878
893
  /**
879
- * \brief Gets the index of a haptic device.
894
+ * Get the index of a haptic device.
880
895
  *
881
- * \param haptic Haptic device to get the index of.
882
- * \return The index of the haptic device or -1 on error.
896
+ * \param haptic the SDL_Haptic device to query
897
+ * \returns the index of the specified haptic device or a negative error code
898
+ * on failure; call SDL_GetError() for more information.
883
899
  *
884
- * \sa SDL_HapticOpen
885
- * \sa SDL_HapticOpened
900
+ * \since This function is available since SDL 2.0.0.
901
+ *
902
+ * \sa SDL_HapticOpen
903
+ * \sa SDL_HapticOpened
886
904
  */
887
905
  extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
888
906
 
889
907
  /**
890
- * \brief Gets whether or not the current mouse has haptic capabilities.
908
+ * Query whether or not the current mouse has haptic capabilities.
891
909
  *
892
- * \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't.
910
+ * \returns SDL_TRUE if the mouse is haptic or SDL_FALSE if it isn't.
893
911
  *
894
- * \sa SDL_HapticOpenFromMouse
912
+ * \since This function is available since SDL 2.0.0.
913
+ *
914
+ * \sa SDL_HapticOpenFromMouse
895
915
  */
896
916
  extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
897
917
 
898
918
  /**
899
- * \brief Tries to open a haptic device from the current mouse.
919
+ * Try to open a haptic device from the current mouse.
900
920
  *
901
- * \return The haptic device identifier or NULL on error.
921
+ * \returns the haptic device identifier or NULL on failure; call
922
+ * SDL_GetError() for more information.
902
923
  *
903
- * \sa SDL_MouseIsHaptic
904
- * \sa SDL_HapticOpen
924
+ * \since This function is available since SDL 2.0.0.
925
+ *
926
+ * \sa SDL_HapticOpen
927
+ * \sa SDL_MouseIsHaptic
905
928
  */
906
929
  extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
907
930
 
908
931
  /**
909
- * \brief Checks to see if a joystick has haptic features.
932
+ * Query if a joystick has haptic features.
910
933
  *
911
- * \param joystick Joystick to test for haptic capabilities.
912
- * \return SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't
913
- * or -1 if an error occurred.
934
+ * \param joystick the SDL_Joystick to test for haptic capabilities
935
+ * \returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't, or a
936
+ * negative error code on failure; call SDL_GetError() for more
937
+ * information.
914
938
  *
915
- * \sa SDL_HapticOpenFromJoystick
939
+ * \since This function is available since SDL 2.0.0.
940
+ *
941
+ * \sa SDL_HapticOpenFromJoystick
916
942
  */
917
943
  extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
918
944
 
919
945
  /**
920
- * \brief Opens a haptic device for use from a joystick device.
946
+ * Open a haptic device for use from a joystick device.
921
947
  *
922
- * You must still close the haptic device separately. It will not be closed
923
- * with the joystick.
948
+ * You must still close the haptic device separately. It will not be closed
949
+ * with the joystick.
924
950
  *
925
- * When opening from a joystick you should first close the haptic device before
926
- * closing the joystick device. If not, on some implementations the haptic
927
- * device will also get unallocated and you'll be unable to use force feedback
928
- * on that device.
951
+ * When opened from a joystick you should first close the haptic device before
952
+ * closing the joystick device. If not, on some implementations the haptic
953
+ * device will also get unallocated and you'll be unable to use force feedback
954
+ * on that device.
929
955
  *
930
- * \param joystick Joystick to create a haptic device from.
931
- * \return A valid haptic device identifier on success or NULL on error.
956
+ * \param joystick the SDL_Joystick to create a haptic device from
957
+ * \returns a valid haptic device identifier on success or NULL on failure;
958
+ * call SDL_GetError() for more information.
932
959
  *
933
- * \sa SDL_HapticOpen
934
- * \sa SDL_HapticClose
960
+ * \since This function is available since SDL 2.0.0.
961
+ *
962
+ * \sa SDL_HapticClose
963
+ * \sa SDL_HapticOpen
964
+ * \sa SDL_JoystickIsHaptic
935
965
  */
936
966
  extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
937
967
  joystick);
938
968
 
939
969
  /**
940
- * \brief Closes a haptic device previously opened with SDL_HapticOpen().
970
+ * Close a haptic device previously opened with SDL_HapticOpen().
971
+ *
972
+ * \param haptic the SDL_Haptic device to close
941
973
  *
942
- * \param haptic Haptic device to close.
974
+ * \since This function is available since SDL 2.0.0.
975
+ *
976
+ * \sa SDL_HapticOpen
943
977
  */
944
978
  extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
945
979
 
946
980
  /**
947
- * \brief Returns the number of effects a haptic device can store.
981
+ * Get the number of effects a haptic device can store.
982
+ *
983
+ * On some platforms this isn't fully supported, and therefore is an
984
+ * approximation. Always check to see if your created effect was actually
985
+ * created and do not rely solely on SDL_HapticNumEffects().
948
986
  *
949
- * On some platforms this isn't fully supported, and therefore is an
950
- * approximation. Always check to see if your created effect was actually
951
- * created and do not rely solely on SDL_HapticNumEffects().
987
+ * \param haptic the SDL_Haptic device to query
988
+ * \returns the number of effects the haptic device can store or a negative
989
+ * error code on failure; call SDL_GetError() for more information.
952
990
  *
953
- * \param haptic The haptic device to query effect max.
954
- * \return The number of effects the haptic device can store or
955
- * -1 on error.
991
+ * \since This function is available since SDL 2.0.0.
956
992
  *
957
- * \sa SDL_HapticNumEffectsPlaying
958
- * \sa SDL_HapticQuery
993
+ * \sa SDL_HapticNumEffectsPlaying
994
+ * \sa SDL_HapticQuery
959
995
  */
960
996
  extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
961
997
 
962
998
  /**
963
- * \brief Returns the number of effects a haptic device can play at the same
964
- * time.
999
+ * Get the number of effects a haptic device can play at the same time.
965
1000
  *
966
- * This is not supported on all platforms, but will always return a value.
967
- * Added here for the sake of completeness.
1001
+ * This is not supported on all platforms, but will always return a value.
968
1002
  *
969
- * \param haptic The haptic device to query maximum playing effects.
970
- * \return The number of effects the haptic device can play at the same time
971
- * or -1 on error.
1003
+ * \param haptic the SDL_Haptic device to query maximum playing effects
1004
+ * \returns the number of effects the haptic device can play at the same time
1005
+ * or a negative error code on failure; call SDL_GetError() for more
1006
+ * information.
972
1007
  *
973
- * \sa SDL_HapticNumEffects
974
- * \sa SDL_HapticQuery
1008
+ * \since This function is available since SDL 2.0.0.
1009
+ *
1010
+ * \sa SDL_HapticNumEffects
1011
+ * \sa SDL_HapticQuery
975
1012
  */
976
1013
  extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
977
1014
 
978
1015
  /**
979
- * \brief Gets the haptic device's supported features in bitwise manner.
1016
+ * Get the haptic device's supported features in bitwise manner.
980
1017
  *
981
- * Example:
982
- * \code
983
- * if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) {
984
- * printf("We have constant haptic effect!\n");
985
- * }
986
- * \endcode
1018
+ * \param haptic the SDL_Haptic device to query
1019
+ * \returns a list of supported haptic features in bitwise manner (OR'd), or 0
1020
+ * on failure; call SDL_GetError() for more information.
987
1021
  *
988
- * \param haptic The haptic device to query.
989
- * \return Haptic features in bitwise manner (OR'd).
1022
+ * \since This function is available since SDL 2.0.0.
990
1023
  *
991
- * \sa SDL_HapticNumEffects
992
- * \sa SDL_HapticEffectSupported
1024
+ * \sa SDL_HapticEffectSupported
1025
+ * \sa SDL_HapticNumEffects
993
1026
  */
994
1027
  extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
995
1028
 
996
1029
 
997
1030
  /**
998
- * \brief Gets the number of haptic axes the device has.
1031
+ * Get the number of haptic axes the device has.
999
1032
  *
1000
- * \sa SDL_HapticDirection
1033
+ * The number of haptic axes might be useful if working with the
1034
+ * SDL_HapticDirection effect.
1035
+ *
1036
+ * \param haptic the SDL_Haptic device to query
1037
+ * \returns the number of axes on success or a negative error code on failure;
1038
+ * call SDL_GetError() for more information.
1039
+ *
1040
+ * \since This function is available since SDL 2.0.0.
1001
1041
  */
1002
1042
  extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
1003
1043
 
1004
1044
  /**
1005
- * \brief Checks to see if effect is supported by haptic.
1045
+ * Check to see if an effect is supported by a haptic device.
1046
+ *
1047
+ * \param haptic the SDL_Haptic device to query
1048
+ * \param effect the desired effect to query
1049
+ * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1050
+ * negative error code on failure; call SDL_GetError() for more
1051
+ * information.
1006
1052
  *
1007
- * \param haptic Haptic device to check on.
1008
- * \param effect Effect to check to see if it is supported.
1009
- * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
1053
+ * \since This function is available since SDL 2.0.0.
1010
1054
  *
1011
- * \sa SDL_HapticQuery
1012
- * \sa SDL_HapticNewEffect
1055
+ * \sa SDL_HapticNewEffect
1056
+ * \sa SDL_HapticQuery
1013
1057
  */
1014
1058
  extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
1015
1059
  SDL_HapticEffect *
1016
1060
  effect);
1017
1061
 
1018
1062
  /**
1019
- * \brief Creates a new haptic effect on the device.
1063
+ * Create a new haptic effect on a specified device.
1020
1064
  *
1021
- * \param haptic Haptic device to create the effect on.
1022
- * \param effect Properties of the effect to create.
1023
- * \return The identifier of the effect on success or -1 on error.
1065
+ * \param haptic an SDL_Haptic device to create the effect on
1066
+ * \param effect an SDL_HapticEffect structure containing the properties of
1067
+ * the effect to create
1068
+ * \returns the ID of the effect on success or a negative error code on
1069
+ * failure; call SDL_GetError() for more information.
1024
1070
  *
1025
- * \sa SDL_HapticUpdateEffect
1026
- * \sa SDL_HapticRunEffect
1027
- * \sa SDL_HapticDestroyEffect
1071
+ * \since This function is available since SDL 2.0.0.
1072
+ *
1073
+ * \sa SDL_HapticDestroyEffect
1074
+ * \sa SDL_HapticRunEffect
1075
+ * \sa SDL_HapticUpdateEffect
1028
1076
  */
1029
1077
  extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
1030
1078
  SDL_HapticEffect * effect);
1031
1079
 
1032
1080
  /**
1033
- * \brief Updates the properties of an effect.
1081
+ * Update the properties of an effect.
1082
+ *
1083
+ * Can be used dynamically, although behavior when dynamically changing
1084
+ * direction may be strange. Specifically the effect may re-upload itself and
1085
+ * start playing from the start. You also cannot change the type either when
1086
+ * running SDL_HapticUpdateEffect().
1034
1087
  *
1035
- * Can be used dynamically, although behavior when dynamically changing
1036
- * direction may be strange. Specifically the effect may reupload itself
1037
- * and start playing from the start. You cannot change the type either when
1038
- * running SDL_HapticUpdateEffect().
1088
+ * \param haptic the SDL_Haptic device that has the effect
1089
+ * \param effect the identifier of the effect to update
1090
+ * \param data an SDL_HapticEffect structure containing the new effect
1091
+ * properties to use
1092
+ * \returns 0 on success or a negative error code on failure; call
1093
+ * SDL_GetError() for more information.
1039
1094
  *
1040
- * \param haptic Haptic device that has the effect.
1041
- * \param effect Identifier of the effect to update.
1042
- * \param data New effect properties to use.
1043
- * \return 0 on success or -1 on error.
1095
+ * \since This function is available since SDL 2.0.0.
1044
1096
  *
1045
- * \sa SDL_HapticNewEffect
1046
- * \sa SDL_HapticRunEffect
1047
- * \sa SDL_HapticDestroyEffect
1097
+ * \sa SDL_HapticDestroyEffect
1098
+ * \sa SDL_HapticNewEffect
1099
+ * \sa SDL_HapticRunEffect
1048
1100
  */
1049
1101
  extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,
1050
1102
  int effect,
1051
1103
  SDL_HapticEffect * data);
1052
1104
 
1053
1105
  /**
1054
- * \brief Runs the haptic effect on its associated haptic device.
1106
+ * Run the haptic effect on its associated haptic device.
1055
1107
  *
1056
- * If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over
1057
- * repeating the envelope (attack and fade) every time. If you only want the
1058
- * effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length
1059
- * parameter.
1108
+ * To repeat the effect over and over indefinitely, set `iterations` to
1109
+ * `SDL_HAPTIC_INFINITY`. (Repeats the envelope - attack and fade.) To make
1110
+ * one instance of the effect last indefinitely (so the effect does not fade),
1111
+ * set the effect's `length` in its structure/union to `SDL_HAPTIC_INFINITY`
1112
+ * instead.
1060
1113
  *
1061
- * \param haptic Haptic device to run the effect on.
1062
- * \param effect Identifier of the haptic effect to run.
1063
- * \param iterations Number of iterations to run the effect. Use
1064
- * ::SDL_HAPTIC_INFINITY for infinity.
1065
- * \return 0 on success or -1 on error.
1114
+ * \param haptic the SDL_Haptic device to run the effect on
1115
+ * \param effect the ID of the haptic effect to run
1116
+ * \param iterations the number of iterations to run the effect; use
1117
+ * `SDL_HAPTIC_INFINITY` to repeat forever
1118
+ * \returns 0 on success or a negative error code on failure; call
1119
+ * SDL_GetError() for more information.
1066
1120
  *
1067
- * \sa SDL_HapticStopEffect
1068
- * \sa SDL_HapticDestroyEffect
1069
- * \sa SDL_HapticGetEffectStatus
1121
+ * \since This function is available since SDL 2.0.0.
1122
+ *
1123
+ * \sa SDL_HapticDestroyEffect
1124
+ * \sa SDL_HapticGetEffectStatus
1125
+ * \sa SDL_HapticStopEffect
1070
1126
  */
1071
1127
  extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,
1072
1128
  int effect,
1073
1129
  Uint32 iterations);
1074
1130
 
1075
1131
  /**
1076
- * \brief Stops the haptic effect on its associated haptic device.
1132
+ * Stop the haptic effect on its associated haptic device.
1133
+ *
1134
+ * *
1077
1135
  *
1078
- * \param haptic Haptic device to stop the effect on.
1079
- * \param effect Identifier of the effect to stop.
1080
- * \return 0 on success or -1 on error.
1136
+ * \param haptic the SDL_Haptic device to stop the effect on
1137
+ * \param effect the ID of the haptic effect to stop
1138
+ * \returns 0 on success or a negative error code on failure; call
1139
+ * SDL_GetError() for more information.
1081
1140
  *
1082
- * \sa SDL_HapticRunEffect
1083
- * \sa SDL_HapticDestroyEffect
1141
+ * \since This function is available since SDL 2.0.0.
1142
+ *
1143
+ * \sa SDL_HapticDestroyEffect
1144
+ * \sa SDL_HapticRunEffect
1084
1145
  */
1085
1146
  extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,
1086
1147
  int effect);
1087
1148
 
1088
1149
  /**
1089
- * \brief Destroys a haptic effect on the device.
1150
+ * Destroy a haptic effect on the device.
1151
+ *
1152
+ * This will stop the effect if it's running. Effects are automatically
1153
+ * destroyed when the device is closed.
1090
1154
  *
1091
- * This will stop the effect if it's running. Effects are automatically
1092
- * destroyed when the device is closed.
1155
+ * \param haptic the SDL_Haptic device to destroy the effect on
1156
+ * \param effect the ID of the haptic effect to destroy
1093
1157
  *
1094
- * \param haptic Device to destroy the effect on.
1095
- * \param effect Identifier of the effect to destroy.
1158
+ * \since This function is available since SDL 2.0.0.
1096
1159
  *
1097
- * \sa SDL_HapticNewEffect
1160
+ * \sa SDL_HapticNewEffect
1098
1161
  */
1099
1162
  extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
1100
1163
  int effect);
1101
1164
 
1102
1165
  /**
1103
- * \brief Gets the status of the current effect on the haptic device.
1166
+ * Get the status of the current effect on the specified haptic device.
1104
1167
  *
1105
- * Device must support the ::SDL_HAPTIC_STATUS feature.
1168
+ * Device must support the SDL_HAPTIC_STATUS feature.
1106
1169
  *
1107
- * \param haptic Haptic device to query the effect status on.
1108
- * \param effect Identifier of the effect to query its status.
1109
- * \return 0 if it isn't playing, 1 if it is playing or -1 on error.
1170
+ * \param haptic the SDL_Haptic device to query for the effect status on
1171
+ * \param effect the ID of the haptic effect to query its status
1172
+ * \returns 0 if it isn't playing, 1 if it is playing, or a negative error
1173
+ * code on failure; call SDL_GetError() for more information.
1110
1174
  *
1111
- * \sa SDL_HapticRunEffect
1112
- * \sa SDL_HapticStopEffect
1175
+ * \since This function is available since SDL 2.0.0.
1176
+ *
1177
+ * \sa SDL_HapticRunEffect
1178
+ * \sa SDL_HapticStopEffect
1113
1179
  */
1114
1180
  extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
1115
1181
  int effect);
1116
1182
 
1117
1183
  /**
1118
- * \brief Sets the global gain of the device.
1184
+ * Set the global gain of the specified haptic device.
1119
1185
  *
1120
- * Device must support the ::SDL_HAPTIC_GAIN feature.
1186
+ * Device must support the SDL_HAPTIC_GAIN feature.
1121
1187
  *
1122
- * The user may specify the maximum gain by setting the environment variable
1123
- * SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to
1124
- * SDL_HapticSetGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the
1125
- * maximum.
1188
+ * The user may specify the maximum gain by setting the environment variable
1189
+ * `SDL_HAPTIC_GAIN_MAX` which should be between 0 and 100. All calls to
1190
+ * SDL_HapticSetGain() will scale linearly using `SDL_HAPTIC_GAIN_MAX` as the
1191
+ * maximum.
1126
1192
  *
1127
- * \param haptic Haptic device to set the gain on.
1128
- * \param gain Value to set the gain to, should be between 0 and 100.
1129
- * \return 0 on success or -1 on error.
1193
+ * \param haptic the SDL_Haptic device to set the gain on
1194
+ * \param gain value to set the gain to, should be between 0 and 100 (0 - 100)
1195
+ * \returns 0 on success or a negative error code on failure; call
1196
+ * SDL_GetError() for more information.
1130
1197
  *
1131
- * \sa SDL_HapticQuery
1198
+ * \since This function is available since SDL 2.0.0.
1199
+ *
1200
+ * \sa SDL_HapticQuery
1132
1201
  */
1133
1202
  extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
1134
1203
 
1135
1204
  /**
1136
- * \brief Sets the global autocenter of the device.
1205
+ * Set the global autocenter of the device.
1206
+ *
1207
+ * Autocenter should be between 0 and 100. Setting it to 0 will disable
1208
+ * autocentering.
1137
1209
  *
1138
- * Autocenter should be between 0 and 100. Setting it to 0 will disable
1139
- * autocentering.
1210
+ * Device must support the SDL_HAPTIC_AUTOCENTER feature.
1140
1211
  *
1141
- * Device must support the ::SDL_HAPTIC_AUTOCENTER feature.
1212
+ * \param haptic the SDL_Haptic device to set autocentering on
1213
+ * \param autocenter value to set autocenter to (0-100)
1214
+ * \returns 0 on success or a negative error code on failure; call
1215
+ * SDL_GetError() for more information.
1142
1216
  *
1143
- * \param haptic Haptic device to set autocentering on.
1144
- * \param autocenter Value to set autocenter to, 0 disables autocentering.
1145
- * \return 0 on success or -1 on error.
1217
+ * \since This function is available since SDL 2.0.0.
1146
1218
  *
1147
- * \sa SDL_HapticQuery
1219
+ * \sa SDL_HapticQuery
1148
1220
  */
1149
1221
  extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
1150
1222
  int autocenter);
1151
1223
 
1152
1224
  /**
1153
- * \brief Pauses a haptic device.
1225
+ * Pause a haptic device.
1154
1226
  *
1155
- * Device must support the ::SDL_HAPTIC_PAUSE feature. Call
1156
- * SDL_HapticUnpause() to resume playback.
1227
+ * Device must support the `SDL_HAPTIC_PAUSE` feature. Call
1228
+ * SDL_HapticUnpause() to resume playback.
1157
1229
  *
1158
- * Do not modify the effects nor add new ones while the device is paused.
1159
- * That can cause all sorts of weird errors.
1230
+ * Do not modify the effects nor add new ones while the device is paused. That
1231
+ * can cause all sorts of weird errors.
1160
1232
  *
1161
- * \param haptic Haptic device to pause.
1162
- * \return 0 on success or -1 on error.
1233
+ * \param haptic the SDL_Haptic device to pause
1234
+ * \returns 0 on success or a negative error code on failure; call
1235
+ * SDL_GetError() for more information.
1163
1236
  *
1164
- * \sa SDL_HapticUnpause
1237
+ * \since This function is available since SDL 2.0.0.
1238
+ *
1239
+ * \sa SDL_HapticUnpause
1165
1240
  */
1166
1241
  extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
1167
1242
 
1168
1243
  /**
1169
- * \brief Unpauses a haptic device.
1244
+ * Unpause a haptic device.
1170
1245
  *
1171
- * Call to unpause after SDL_HapticPause().
1246
+ * Call to unpause after SDL_HapticPause().
1172
1247
  *
1173
- * \param haptic Haptic device to unpause.
1174
- * \return 0 on success or -1 on error.
1248
+ * \param haptic the SDL_Haptic device to unpause
1249
+ * \returns 0 on success or a negative error code on failure; call
1250
+ * SDL_GetError() for more information.
1175
1251
  *
1176
- * \sa SDL_HapticPause
1252
+ * \since This function is available since SDL 2.0.0.
1253
+ *
1254
+ * \sa SDL_HapticPause
1177
1255
  */
1178
1256
  extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
1179
1257
 
1180
1258
  /**
1181
- * \brief Stops all the currently playing effects on a haptic device.
1259
+ * Stop all the currently playing effects on a haptic device.
1260
+ *
1261
+ * \param haptic the SDL_Haptic device to stop
1262
+ * \returns 0 on success or a negative error code on failure; call
1263
+ * SDL_GetError() for more information.
1182
1264
  *
1183
- * \param haptic Haptic device to stop.
1184
- * \return 0 on success or -1 on error.
1265
+ * \since This function is available since SDL 2.0.0.
1185
1266
  */
1186
1267
  extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
1187
1268
 
1188
1269
  /**
1189
- * \brief Checks to see if rumble is supported on a haptic device.
1270
+ * Check whether rumble is supported on a haptic device.
1190
1271
  *
1191
- * \param haptic Haptic device to check to see if it supports rumble.
1192
- * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
1272
+ * \param haptic haptic device to check for rumble support
1273
+ * \returns SDL_TRUE if effect is supported, SDL_FALSE if it isn't, or a
1274
+ * negative error code on failure; call SDL_GetError() for more
1275
+ * information.
1193
1276
  *
1194
- * \sa SDL_HapticRumbleInit
1195
- * \sa SDL_HapticRumblePlay
1196
- * \sa SDL_HapticRumbleStop
1277
+ * \since This function is available since SDL 2.0.0.
1278
+ *
1279
+ * \sa SDL_HapticRumbleInit
1280
+ * \sa SDL_HapticRumblePlay
1281
+ * \sa SDL_HapticRumbleStop
1197
1282
  */
1198
1283
  extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
1199
1284
 
1200
1285
  /**
1201
- * \brief Initializes the haptic device for simple rumble playback.
1286
+ * Initialize a haptic device for simple rumble playback.
1202
1287
  *
1203
- * \param haptic Haptic device to initialize for simple rumble playback.
1204
- * \return 0 on success or -1 on error.
1288
+ * \param haptic the haptic device to initialize for simple rumble playback
1289
+ * \returns 0 on success or a negative error code on failure; call
1290
+ * SDL_GetError() for more information.
1205
1291
  *
1206
- * \sa SDL_HapticOpen
1207
- * \sa SDL_HapticRumbleSupported
1208
- * \sa SDL_HapticRumblePlay
1209
- * \sa SDL_HapticRumbleStop
1292
+ * \since This function is available since SDL 2.0.0.
1293
+ *
1294
+ * \sa SDL_HapticOpen
1295
+ * \sa SDL_HapticRumblePlay
1296
+ * \sa SDL_HapticRumbleStop
1297
+ * \sa SDL_HapticRumbleSupported
1210
1298
  */
1211
1299
  extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
1212
1300
 
1213
1301
  /**
1214
- * \brief Runs simple rumble on a haptic device
1302
+ * Run a simple rumble effect on a haptic device.
1303
+ *
1304
+ * \param haptic the haptic device to play the rumble effect on
1305
+ * \param strength strength of the rumble to play as a 0-1 float value
1306
+ * \param length length of the rumble to play in milliseconds
1307
+ * \returns 0 on success or a negative error code on failure; call
1308
+ * SDL_GetError() for more information.
1215
1309
  *
1216
- * \param haptic Haptic device to play rumble effect on.
1217
- * \param strength Strength of the rumble to play as a 0-1 float value.
1218
- * \param length Length of the rumble to play in milliseconds.
1219
- * \return 0 on success or -1 on error.
1310
+ * \since This function is available since SDL 2.0.0.
1220
1311
  *
1221
- * \sa SDL_HapticRumbleSupported
1222
- * \sa SDL_HapticRumbleInit
1223
- * \sa SDL_HapticRumbleStop
1312
+ * \sa SDL_HapticRumbleInit
1313
+ * \sa SDL_HapticRumbleStop
1314
+ * \sa SDL_HapticRumbleSupported
1224
1315
  */
1225
1316
  extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );
1226
1317
 
1227
1318
  /**
1228
- * \brief Stops the simple rumble on a haptic device.
1319
+ * Stop the simple rumble on a haptic device.
1320
+ *
1321
+ * \param haptic the haptic device to stop the rumble effect on
1322
+ * \returns 0 on success or a negative error code on failure; call
1323
+ * SDL_GetError() for more information.
1229
1324
  *
1230
- * \param haptic Haptic to stop the rumble on.
1231
- * \return 0 on success or -1 on error.
1325
+ * \since This function is available since SDL 2.0.0.
1232
1326
  *
1233
- * \sa SDL_HapticRumbleSupported
1234
- * \sa SDL_HapticRumbleInit
1235
- * \sa SDL_HapticRumblePlay
1327
+ * \sa SDL_HapticRumbleInit
1328
+ * \sa SDL_HapticRumblePlay
1329
+ * \sa SDL_HapticRumbleSupported
1236
1330
  */
1237
1331
  extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
1238
1332