Commit Graph

221 Commits

Author SHA1 Message Date
Sam Lantinga f8eac30276 Added SDL_StepBackUTF8() 2024-10-09 09:49:10 -07:00
Ryan C. Gordon 02434cd293
emscripten: Fixes for data addresses above 2gb
This includes both wasm64 and wasm32 when addressing more than 2gb of memory.

Fixes: #9052

(Manually cherry-picked from 3deb07ea395373204462130c1e062bc1f71fe060.)
2024-10-08 17:41:18 -04:00
Naman Dixit 54e622c2e6 Use the printf vararg verification macros when compiling with clang 2024-10-06 22:19:52 -07:00
SDL Wiki Bot 798c9574d0 Sync SDL3 wiki -> header 2024-10-01 17:46:16 +00:00
Sam Lantinga 89e68aa801 Added missing return value documentation for bsearch() 2024-10-01 10:45:32 -07:00
Sam Lantinga 4fa92d233d Include stdbool.h when using Visual Studio 2017+
Also cleaned up some incorrect return values from bool functions.
2024-10-01 09:57:59 -07:00
SDL Wiki Bot c16d7c87d6 Sync SDL3 wiki -> header 2024-09-30 18:18:49 +00:00
Sam Lantinga ab832f1be0 Added documentation for qsort and bsearch functions 2024-09-30 11:18:17 -07:00
Sam Lantinga a923771978 Added SDL_murmur3_32() 2024-09-28 17:19:01 -07:00
Sam Lantinga 039148fb0e Updated check for stdbool.h
If you're building in a C99 or newer environment, we'll automatically include stdbool.h.

If you're building in a C89 or C90 environment, we'll assume that stdbool.h isn't available and define bool as an unsigned char. If you have a working stdbool.h and want SDL to use it, you can either include stdbool.h before SDL headers, or define SDL_INCLUDE_STDBOOL_H in your project.

Closes https://github.com/libsdl-org/SDL/pull/10980
2024-09-28 16:55:09 -07:00
Sam Lantinga 3f446d8fb5 Minor cleanup 2024-09-27 14:10:46 -07:00
Sam Lantinga b0e528cc88 Switched ifdef from negative to positive 2024-09-21 20:12:54 -07:00
Ozkan Sezer 254b36361e Add SDL_PRILL? format specifiers specifically for long long type. 2024-09-21 23:03:50 +03:00
Ozkan Sezer 7edf7fad66 fix bool define when SDL_DEFINE_STDBOOL is defined:
it should be unsigned.
2024-09-18 12:17:22 -07:00
Ozkan Sezer ff90570a3c define SDL_DEFINE_STDBOOL for gcc < 3 2024-09-18 12:17:22 -07:00
Sam Lantinga ea640894d3 Fixed SDL_DEFINE_STDBOOL logic if __bool_true_false_are_defined is defined 2024-09-18 10:50:52 -07:00
Sam Lantinga 32fd1878a0 Provide a definition of bool if needed for your environment 2024-09-18 10:37:11 -07:00
SDL Wiki Bot 026d3c2306 Sync SDL3 wiki -> header 2024-09-18 15:33:11 +00:00
Sam Lantinga a90ad3b0e2 Removed SDL_bool in favor of plain bool
We require stdbool.h in the build environment, so we might as well use the plain bool type.

If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
Sam Lantinga 97d40b9218 Removed SDL_CleanupEnvironment() 2024-09-15 10:00:21 -07:00
SDL Wiki Bot a7f1deae8d Sync SDL3 wiki -> header 2024-09-15 16:38:38 +00:00
Sam Lantinga 28b94c4758 Re-added SDL_getenv() as a thread-safe getenv() implementation 2024-09-15 09:37:04 -07:00
Sam Lantinga 8569bde053 Fixed typo 2024-09-14 14:35:57 -07:00
SDL Wiki Bot 706aaaf280 Sync SDL3 wiki -> header 2024-09-14 20:23:16 +00:00
Ryan C. Gordon 3bc0347761
Revert "Sync SDL3 wiki -> header"
This reverts commit 35427ff9ec.
2024-09-14 16:22:16 -04:00
Ryan C. Gordon c2e4b14a82
Revert "stdinc: Added missing `\param` to SDL_CreateEnvironment."
This reverts commit 919f8d3e2b.
2024-09-14 16:22:09 -04:00
Ryan C. Gordon 11c9975caa
Revert "Sync SDL3 wiki -> header"
This reverts commit ba65767afa.
2024-09-14 16:22:00 -04:00
SDL Wiki Bot ba65767afa Sync SDL3 wiki -> header 2024-09-14 20:18:20 +00:00
Ryan C. Gordon 919f8d3e2b
stdinc: Added missing `\param` to SDL_CreateEnvironment. 2024-09-14 16:17:29 -04:00
SDL Wiki Bot 35427ff9ec Sync SDL3 wiki -> header 2024-09-14 20:11:24 +00:00
Sam Lantinga aa7357a14d SDL_CreateEnvironment() fills the environment with a non-zero parameter 2024-09-14 10:29:02 -07:00
Sam Lantinga 90e01040c5 Added thread-safe environment functions
Also marked the existing functions as unsafe, as they can cause crashes if used in multi-threaded applications.

As a bonus, since the new functions are hashtable based, hint environment lookups are much faster.
2024-09-13 22:14:54 -07:00
SDL Wiki Bot d483886ec5 Sync SDL3 wiki -> header 2024-09-13 19:32:14 +00:00
Carl Åstholm 7d94bf528d stdlib: Document SDL_strtox functions 2024-09-13 12:30:58 -07:00
Carl Åstholm fb82772fb3 stdlib: Rewrite SDL_strtoull impl 2024-09-13 12:30:58 -07:00
Carl Åstholm 4efbe1ca28 stdlib: Assert that signed integers use two's complement arithmetic 2024-09-13 12:30:58 -07:00
Carl Åstholm fd53b3e112 stdlib: Rewrite SDL_wcstol impl
SDL_wcstol should now fully adhere to the libc spec.
2024-09-13 12:30:58 -07:00
Sam Lantinga 4eb4370500 SDL_strtoll(), SDL_strtoull(), SDL_lltoa(), and SDL_ulltoa() use long long values 2024-09-09 15:46:26 -07:00
SDL Wiki Bot 7d1bbae6b2 Sync SDL3 wiki -> header 2024-09-09 20:51:57 +00:00
Carl Åstholm af37056c0d stdinc: Fix typos and reword comments about aliasing 2024-09-09 13:51:16 -07:00
Carl Åstholm 8eb194b6f8 stdinc: Document number parsing APIs 2024-09-09 13:51:16 -07:00
Carl Åstholm eda459ac49 stdinc: Fix up some printf definitions 2024-09-09 13:51:16 -07:00
Carl Åstholm d6caf2abe7 Remove SDL_RESTRICT in favor of doc comments 2024-09-09 13:51:16 -07:00
Carl Åstholm 731939fca1 stdinc: Document memcpy APIs 2024-09-09 13:51:16 -07:00
Carl Åstholm 8cea4bd3c9 stdinc: Document memory allocation APIs 2024-09-09 13:51:16 -07:00
SDL Wiki Bot 6e885d9619 Sync SDL3 wiki -> header 2024-09-09 06:56:45 +00:00
SDL Wiki Bot 301f3ffa9d Sync SDL3 wiki -> header 2024-09-09 06:50:28 +00:00
Ryan C. Gordon 050aa4d084
include: Filling in more documentation gaps. 2024-09-09 02:49:43 -04:00
Ryan C. Gordon 845855d657
Revert "stdinc: Document more symbols."
This reverts commit c93f76436f.

This looked better with the #defines attached to the typedef symbols.
2024-09-06 15:33:27 -04:00
Ryan C. Gordon c93f76436f
stdinc: Document more symbols. 2024-09-06 15:30:56 -04:00
Ryan C. Gordon ac08dde1b2 windows: Clean out things that should be using `defined(SDL_PLATFORM_WINDOWS)`. 2024-09-06 13:28:39 -04:00
SDL Wiki Bot e7969553f8 Sync SDL3 wiki -> header 2024-09-06 02:17:29 +00:00
Sam Lantinga 702ed83f72 Initialize interface structures so they can be extended in the future
We guarantee that we will only add to the end of these interfaces, and any new fields will be optional.
2024-09-05 19:16:00 -07:00
SDL Wiki Bot 741c04b339 Sync SDL3 wiki -> header 2024-09-05 23:36:17 +00:00
Anonymous Maarten baa1a5e2f4 Add SDL_strpbrk 2024-09-06 01:35:43 +02:00
Sam Lantinga 04a732881a Add a test to verify structure alignment 2024-09-05 15:27:56 -07:00
SDL Wiki Bot 19fb43b94f Sync SDL3 wiki -> header 2024-09-03 00:19:03 +00:00
Sam Lantinga eacf119923 Renamed SDL_size_add_overflow() and SDL_size_mul_overflow() 2024-09-02 17:17:48 -07:00
SDL Wiki Bot 85bbc6028a Sync SDL3 wiki -> header 2024-08-27 17:33:28 +00:00
Sam Lantinga f08ac438ed Use stdbool for SDL_bool
This helps the compiler warn people when they're doing something like "if (SDL_Init(0) < 0)"
2024-08-27 10:31:46 -07:00
Sam Lantinga 9ff3446f03 Use SDL_bool instead an int return code in the SDL API
Most SDL functions used to indicate success or failure using an int return code. These functions have been changed to return SDL_bool.

Here is a coccinelle patch to change code that previously compared the return value to 0 and changes it to a boolean test:
@ bool_return_type  @
identifier func =~ "^(SDL_AddEventWatch|SDL_AddHintCallback|SDL_AddSurfaceAlternateImage|SDL_AddVulkanRenderSemaphores|SDL_BindAudioStream|SDL_BindAudioStreams|SDL_BlitSurface|SDL_BlitSurface9Grid|SDL_BlitSurfaceScaled|SDL_BlitSurfaceTiled|SDL_BlitSurfaceTiledWithScale|SDL_BlitSurfaceUnchecked|SDL_BlitSurfaceUncheckedScaled|SDL_CaptureMouse|SDL_ClearAudioStream|SDL_ClearClipboardData|SDL_ClearComposition|SDL_ClearError|SDL_ClearProperty|SDL_ClearSurface|SDL_CloseIO|SDL_CloseStorage|SDL_ConvertAudioSamples|SDL_ConvertEventToRenderCoordinates|SDL_ConvertPixels|SDL_ConvertPixelsAndColorspace|SDL_CopyFile|SDL_CopyProperties|SDL_CopyStorageFile|SDL_CreateDirectory|SDL_CreateStorageDirectory|SDL_CreateWindowAndRenderer|SDL_DateTimeToTime|SDL_DestroyWindowSurface|SDL_DetachVirtualJoystick|SDL_DisableScreenSaver|SDL_EnableScreenSaver|SDL_EnumerateDirectory|SDL_EnumerateProperties|SDL_EnumerateStorageDirectory|SDL_FillSurfaceRect|SDL_FillSurfaceRects|SDL_FlashWindow|SDL_FlipSurface|SDL_FlushAudioStream|SDL_FlushRenderer|SDL_GL_DestroyContext|SDL_GL_GetAttribute|SDL_GL_GetSwapInterval|SDL_GL_LoadLibrary|SDL_GL_MakeCurrent|SDL_GL_SetAttribute|SDL_GL_SetSwapInterval|SDL_GL_SwapWindow|SDL_GetAudioDeviceFormat|SDL_GetAudioStreamFormat|SDL_GetCameraFormat|SDL_GetClosestFullscreenDisplayMode|SDL_GetCurrentRenderOutputSize|SDL_GetCurrentTime|SDL_GetDXGIOutputInfo|SDL_GetDateTimeLocalePreferences|SDL_GetDisplayBounds|SDL_GetDisplayUsableBounds|SDL_GetGDKDefaultUser|SDL_GetGDKTaskQueue|SDL_GetGamepadSensorData|SDL_GetGamepadTouchpadFinger|SDL_GetHapticEffectStatus|SDL_GetJoystickBall|SDL_GetMasksForPixelFormat|SDL_GetPathInfo|SDL_GetRectUnion|SDL_GetRectUnionFloat|SDL_GetRenderClipRect|SDL_GetRenderColorScale|SDL_GetRenderDrawBlendMode|SDL_GetRenderDrawColor|SDL_GetRenderDrawColorFloat|SDL_GetRenderLogicalPresentation|SDL_GetRenderLogicalPresentationRect|SDL_GetRenderOutputSize|SDL_GetRenderSafeArea|SDL_GetRenderScale|SDL_GetRenderVSync|SDL_GetRenderViewport|SDL_GetSensorData|SDL_GetStorageFileSize|SDL_GetStoragePathInfo|SDL_GetSurfaceAlphaMod|SDL_GetSurfaceBlendMode|SDL_GetSurfaceClipRect|SDL_GetSurfaceColorKey|SDL_GetSurfaceColorMod|SDL_GetTextInputArea|SDL_GetTextureAlphaMod|SDL_GetTextureAlphaModFloat|SDL_GetTextureBlendMode|SDL_GetTextureColorMod|SDL_GetTextureColorModFloat|SDL_GetTextureScaleMode|SDL_GetTextureSize|SDL_GetWindowAspectRatio|SDL_GetWindowBordersSize|SDL_GetWindowMaximumSize|SDL_GetWindowMinimumSize|SDL_GetWindowPosition|SDL_GetWindowRelativeMouseMode|SDL_GetWindowSafeArea|SDL_GetWindowSize|SDL_GetWindowSizeInPixels|SDL_GetWindowSurfaceVSync|SDL_HideCursor|SDL_HideWindow|SDL_Init|SDL_InitHapticRumble|SDL_InitSubSystem|SDL_LoadWAV|SDL_LoadWAV_IO|SDL_LockAudioStream|SDL_LockProperties|SDL_LockSurface|SDL_LockTexture|SDL_LockTextureToSurface|SDL_MaximizeWindow|SDL_MinimizeWindow|SDL_MixAudio|SDL_OpenURL|SDL_OutOfMemory|SDL_PauseAudioDevice|SDL_PauseAudioStreamDevice|SDL_PauseHaptic|SDL_PlayHapticRumble|SDL_PremultiplyAlpha|SDL_PremultiplySurfaceAlpha|SDL_PushEvent|SDL_PutAudioStreamData|SDL_RaiseWindow|SDL_ReadStorageFile|SDL_ReadSurfacePixel|SDL_ReadSurfacePixelFloat|SDL_RegisterApp|SDL_ReloadGamepadMappings|SDL_RemovePath|SDL_RemoveStoragePath|SDL_RemoveTimer|SDL_RenamePath|SDL_RenameStoragePath|SDL_RenderClear|SDL_RenderCoordinatesFromWindow|SDL_RenderCoordinatesToWindow|SDL_RenderFillRect|SDL_RenderFillRects|SDL_RenderGeometry|SDL_RenderGeometryRaw|SDL_RenderLine|SDL_RenderLines|SDL_RenderPoint|SDL_RenderPoints|SDL_RenderPresent|SDL_RenderRect|SDL_RenderRects|SDL_RenderTexture|SDL_RenderTexture9Grid|SDL_RenderTextureRotated|SDL_RenderTextureTiled|SDL_RequestAndroidPermission|SDL_RestoreWindow|SDL_ResumeAudioDevice|SDL_ResumeAudioStreamDevice|SDL_ResumeHaptic|SDL_RumbleGamepad|SDL_RumbleGamepadTriggers|SDL_RumbleJoystick|SDL_RumbleJoystickTriggers|SDL_RunHapticEffect|SDL_SaveBMP|SDL_SaveBMP_IO|SDL_SendAndroidMessage|SDL_SendGamepadEffect|SDL_SendJoystickEffect|SDL_SendJoystickVirtualSensorData|SDL_SetAppMetadata|SDL_SetAppMetadataProperty|SDL_SetAudioDeviceGain|SDL_SetAudioPostmixCallback|SDL_SetAudioStreamFormat|SDL_SetAudioStreamFrequencyRatio|SDL_SetAudioStreamGain|SDL_SetAudioStreamGetCallback|SDL_SetAudioStreamInputChannelMap|SDL_SetAudioStreamOutputChannelMap|SDL_SetAudioStreamPutCallback|SDL_SetBooleanProperty|SDL_SetClipboardData|SDL_SetClipboardText|SDL_SetCursor|SDL_SetFloatProperty|SDL_SetGamepadLED|SDL_SetGamepadMapping|SDL_SetGamepadPlayerIndex|SDL_SetGamepadSensorEnabled|SDL_SetHapticAutocenter|SDL_SetHapticGain|SDL_SetJoystickLED|SDL_SetJoystickPlayerIndex|SDL_SetJoystickVirtualAxis|SDL_SetJoystickVirtualBall|SDL_SetJoystickVirtualButton|SDL_SetJoystickVirtualHat|SDL_SetJoystickVirtualTouchpad|SDL_SetLinuxThreadPriority|SDL_SetLinuxThreadPriorityAndPolicy|SDL_SetLogPriorityPrefix|SDL_SetMemoryFunctions|SDL_SetNumberProperty|SDL_SetPaletteColors|SDL_SetPointerProperty|SDL_SetPointerPropertyWithCleanup|SDL_SetPrimarySelectionText|SDL_SetRenderClipRect|SDL_SetRenderColorScale|SDL_SetRenderDrawBlendMode|SDL_SetRenderDrawColor|SDL_SetRenderDrawColorFloat|SDL_SetRenderLogicalPresentation|SDL_SetRenderScale|SDL_SetRenderTarget|SDL_SetRenderVSync|SDL_SetRenderViewport|SDL_SetScancodeName|SDL_SetStringProperty|SDL_SetSurfaceAlphaMod|SDL_SetSurfaceBlendMode|SDL_SetSurfaceColorKey|SDL_SetSurfaceColorMod|SDL_SetSurfaceColorspace|SDL_SetSurfacePalette|SDL_SetSurfaceRLE|SDL_SetTLS|SDL_SetTextInputArea|SDL_SetTextureAlphaMod|SDL_SetTextureAlphaModFloat|SDL_SetTextureBlendMode|SDL_SetTextureColorMod|SDL_SetTextureColorModFloat|SDL_SetTextureScaleMode|SDL_SetThreadPriority|SDL_SetWindowAlwaysOnTop|SDL_SetWindowAspectRatio|SDL_SetWindowBordered|SDL_SetWindowFocusable|SDL_SetWindowFullscreen|SDL_SetWindowFullscreenMode|SDL_SetWindowHitTest|SDL_SetWindowIcon|SDL_SetWindowKeyboardGrab|SDL_SetWindowMaximumSize|SDL_SetWindowMinimumSize|SDL_SetWindowModalFor|SDL_SetWindowMouseGrab|SDL_SetWindowMouseRect|SDL_SetWindowOpacity|SDL_SetWindowPosition|SDL_SetWindowRelativeMouseMode|SDL_SetWindowResizable|SDL_SetWindowShape|SDL_SetWindowSize|SDL_SetWindowSurfaceVSync|SDL_SetWindowTitle|SDL_SetiOSAnimationCallback|SDL_ShowAndroidToast|SDL_ShowCursor|SDL_ShowMessageBox|SDL_ShowSimpleMessageBox|SDL_ShowWindow|SDL_ShowWindowSystemMenu|SDL_StartTextInput|SDL_StartTextInputWithProperties|SDL_StopHapticEffect|SDL_StopHapticEffects|SDL_StopHapticRumble|SDL_StopTextInput|SDL_SyncWindow|SDL_TimeToDateTime|SDL_TryLockMutex|SDL_TryLockRWLockForReading|SDL_TryLockRWLockForWriting|SDL_TryWaitSemaphore|SDL_UnlockAudioStream|SDL_UpdateHapticEffect|SDL_UpdateNVTexture|SDL_UpdateTexture|SDL_UpdateWindowSurface|SDL_UpdateWindowSurfaceRects|SDL_UpdateYUVTexture|SDL_Vulkan_CreateSurface|SDL_Vulkan_LoadLibrary|SDL_WaitConditionTimeout|SDL_WaitSemaphoreTimeout|SDL_WarpMouseGlobal|SDL_WriteStorageFile|SDL_WriteSurfacePixel|SDL_WriteSurfacePixelFloat)$";
@@
(
  func(
  ...
  )
- == 0
|
- func(
+ !func(
  ...
  )
- < 0
|
- func(
+ !func(
  ...
  )
- != 0
|
- func(
+ !func(
  ...
  )
- == -1
)
2024-08-27 10:31:46 -07:00
SDL Wiki Bot 8a3bb11024 Sync SDL3 wiki -> header 2024-08-06 17:17:11 +00:00
SDL Wiki Bot 1ecf05be93 Sync SDL3 wiki -> header 2024-08-06 17:12:54 +00:00
Anonymous Maarten 0fa2049fef
Document iconv functions + add testautomation (#10131)
* stdinc: document SDL_iconv* functions
* iconv: add automation tests
* iconv: don't potentially crash on invalid inputs
2024-08-06 10:12:25 -07:00
Sam Lantinga b5ad74998b Removed SDL_DECLSPEC_FREE 2024-07-28 07:24:21 -07:00
Sam Lantinga 473feab2a4 Added SDL_unsetenv() 2024-07-27 09:10:08 -07:00
Anonymous Maarten 3374e57102 stdinc: strcasecmp is declared in strings.h 2024-07-27 15:19:20 +00:00
Sam Lantinga 4f55271571 Removed temporary memory from the API
It was intended to make the API easier to use, but various automatic garbage collection all had flaws, and making the application periodically clean up temporary memory added cognitive load to using the API, and in many cases was it was difficult to restructure threaded code to handle this.

So, we're largely going back to the original system, where the API returns allocated results and you free them.

In addition, to solve the problems we originally wanted temporary memory for:
* Short strings with a finite count, like device names, get stored in a per-thread string pool.
* Events continue to use temporary memory internally, which is cleaned up on the next event processing cycle.
2024-07-26 20:59:14 -07:00
SDL Wiki Bot 230161a50c Sync SDL3 wiki -> header 2024-07-23 22:49:23 +00:00
Sam Lantinga 29f0fd33dc SDL_getenv() should return const
This also allows us to use SDL_FreeLater() and make SDL_getenv() thread-safe on Windows.
2024-07-22 13:00:39 -07:00
Ozkan Sezer 70c1012e8c SDL_stdinc.h (SDL_COMPILE_TIME_ASSERT): Keep C++ case alone (after PR/10331)
Some versions of gcc will define __STDC_VERSION__ even when compiling in C++ mode.
Reference issue: https://github.com/libsdl-org/SDL/issues/6078 which was fixed by
f6b81125b3
2024-07-22 16:00:37 +03:00
Anonymous Maarten 22bfbdbc02 stdinc: c23 deprecated _Static_assert in favor of static_assert 2024-07-21 21:51:55 +03:00
Sam Lantinga 637e9700dd Standardize placement of '*' in function declarations
Implemented using these sed commands on the headers:
sed -E -i'' '/SDLCALL|;/ s,([a-z])\* ,\1 *,g' *
sed -E -i'' 's,(\(.*[^\*])\* ([a-z])(.*\)),\1*\2\3,g' *
sed -E -i'' 's,\*const,* const,g' *
sed -E -i'' 's,\*SDLCALL,* SDLCALL,g' *
sed -E -i'' 's,void\(,void (,g' *
git checkout *gl*
2024-07-19 12:22:03 -07:00
SDL Wiki Bot 0cdc60666b Sync SDL3 wiki -> header 2024-07-14 21:04:37 +00:00
Ryan C. Gordon f61900465c
stdinc: Fixed up documentation details for standard types. 2024-07-14 17:03:15 -04:00
Sam Lantinga cad9e6ea20 Fixed SDL_SINT64_C typo
Apparently all the platforms we compile on have INT64_C defined?

Fixes https://github.com/libsdl-org/SDL/issues/10268
2024-07-14 12:53:32 -07:00
SDL Wiki Bot b43f1688d9 Sync SDL3 wiki -> header 2024-07-04 15:12:07 +00:00
Ryan C. Gordon c3bf874abf stdlib: Clean up and export SDL_UCS4ToUTF8().
Also fix internal usage of the function.

Fixes #10157.
2024-07-04 11:10:50 -04:00
SDL Wiki Bot b7ab5182d3 Sync SDL3 wiki -> header 2024-06-27 21:37:27 +00:00
Ryan C. Gordon a9cfcf6bde stdinc: Drastically improve SDL_StepUTF8() and make it a public API.
Fixes #10105.
2024-06-27 17:36:09 -04:00
SDL Wiki Bot 2c745dbd3c Sync SDL3 wiki -> header 2024-06-24 18:50:19 +00:00
Sam Lantinga 2f5b20fcb5 Updated based on feedback from @JKaniarz 2024-06-24 11:49:15 -07:00
Sam Lantinga 96f2f23240 Simplified SDL random function names and added thread-safe versions 2024-06-24 11:49:15 -07:00
Sam Lantinga 89cdadf7c3 Added SDL_isinf(), SDL_isinff(), SDL_isnan(), and SDL_isnanf() 2024-06-24 11:49:15 -07:00
SDL Wiki Bot e6944584a0 Sync SDL3 wiki -> header 2024-06-20 00:01:27 +00:00
John Kaniarz 8f29f8cae5 Renamed SDL_rand() to SDL_rand_bits() and updated tests 2024-06-19 17:00:58 -07:00
SDL Wiki Bot 237bbfcb9d Sync SDL3 wiki -> header 2024-06-19 18:02:45 +00:00
John Kaniarz 16e69cb4c9 Removed SDL_rand_r() 2024-06-19 11:02:02 -07:00
John Kaniarz 86b06f74dc Updated docs 2024-06-19 11:02:02 -07:00
John Kaniarz 83d21e20df Added SDL_rand_float and SDL_rand_n to API 2024-06-19 11:02:02 -07:00
Sam Lantinga 182a28b343 Fixed documentation typo 2024-06-16 08:01:16 -07:00
SDL Wiki Bot 4e5ed569c3 Sync SDL3 wiki -> header 2024-06-16 14:42:00 +00:00
Sam Lantinga d1d484ddbe Added SDL_srand(), SDL_rand(), and SDL_rand_r() (thanks @JKaniarz!)
These are simple random functions that should not be used for serious random number generation.

Fixes https://github.com/libsdl-org/SDL/issues/4968
2024-06-16 07:41:00 -07:00
Ryan C. Gordon 51902d4ac5
Updated headers with latest wikiheaders tweaks. 2024-06-14 02:09:55 -04:00
Ryan C. Gordon 2ad7c70ac6
documentation: clean up a minor syntax issue. 2024-06-13 18:10:28 -04:00
SDL Wiki Bot fa3e22c5da Sync SDL3 wiki -> header 2024-06-13 21:04:27 +00:00
Ryan C. Gordon 12119cbaad
include: Several documentation tweaks; cleaned up new wikiheaders warnings. 2024-06-13 17:03:31 -04:00
SDL Wiki Bot 99f0309ac1 Sync SDL3 wiki -> header 2024-06-12 23:34:42 +00:00
Ryan C. Gordon 96f2ef77ab
include: Make function pointer params into typedefs.
This is easier to read and document in general, but will also make some
new parsing work in wikiheaders much easier.
2024-06-11 12:22:46 -04:00
Ryan C. Gordon 8af58b4bec
SDL_FLT_EPSILON: Updated documentation to be wikiheaders-friendly. 2024-06-08 23:15:21 -04:00