Commit Graph

3197 Commits

Author SHA1 Message Date
Evan Hemsley 1c8c014481
GPU: Document opaque handles and enums (#10700) 2024-09-04 18:24:11 -07:00
Evan Hemsley 1788be8547
GPU: Add const to some function parameters (#10694) 2024-09-04 13:53:41 -07:00
Ozkan Sezer f317581c91 SDL_log.h: Use ASCII characters.
(was missed in commit 7ca676aeed for issue #10636)
2024-09-04 14:56:40 +03:00
Sam Lantinga 7ca676aeed Use ASCII characters in SDL source and headers
Fixes https://github.com/libsdl-org/SDL/issues/10636
2024-09-03 12:52:27 -07:00
Sam Lantinga 575d9cda6f The parameter to SDL_AppEvent() should be non-const
This allows functions like SDL_ConvertEventToRenderCoordinates() to work without having to copy the event.

Fixes https://github.com/libsdl-org/SDL/issues/10691
2024-09-03 08:18:36 -07:00
Sam Lantinga 73898a0a64 Renamed NDA platform constants to "PRIVATE" 2024-09-02 21:00:34 -07:00
Caleb Cornett b233beca47 GPU: Minor documentation cleanup 2024-09-02 18:01:43 -07:00
SDL Wiki Bot 19fb43b94f Sync SDL3 wiki -> header 2024-09-03 00:19:03 +00:00
Sam Lantinga 46ffa82f4e Added SDL_ALPHA_OPAQUE_FLOAT and SDL_ALPHA_TRANSPARENT_FLOAT
Fixes https://github.com/libsdl-org/SDL/issues/10684
2024-09-02 17:17:48 -07:00
Sam Lantinga 18c46a3313 Fixed SDL_pen.h for SDL3 bit flag conventions 2024-09-02 17:17:48 -07:00
Sam Lantinga eacf119923 Renamed SDL_size_add_overflow() and SDL_size_mul_overflow() 2024-09-02 17:17:48 -07:00
Andrei Alexeyev fb7245fb93
GPU: Add support for more texture formats (#10641) 2024-09-02 19:14:48 -05:00
Caleb Cornett f405def691
Change GPU flag enums to defines (#10681) 2024-09-02 15:19:43 -07:00
Petar Popovic 1751e127c8 Removed trailing commas in enums 2024-09-01 06:23:20 -07:00
Maia 35ebaf4a45 Fix multiple definitions of SDL_assert* when SDL_WIKI_DOCUMENTATION_SECTION is defined 2024-08-31 20:08:36 -07:00
Petar Popovic 0f59d2f8c9 SDL_test_memory.h: Added void to function prototype 2024-08-31 20:03:25 -07:00
Petar Popovic d1739ce3a8 Added headers to some SDL_test_*.h files 2024-08-31 11:56:27 -07:00
Sam Lantinga 92d1689eb4 Added missing SDL_begin_code.h and SDL_close_code.h to SDL_gpu.h 2024-08-31 10:02:46 -07:00
Sam Lantinga 60760b9abb Sort headers in SDL_gpu.h 2024-08-31 10:00:11 -07:00
Petar Popovic 3f05e9cd58 Added includes to SDL_gpu.h 2024-08-31 09:59:17 -07:00
Sam Lantinga f827c1322c Renamed SDL_Del* to SDL_Remove* 2024-08-31 07:46:28 -07:00
Sam Lantinga cf1d8e2dfd Renamed SDL_AtomicSetPtr() and SDL_AtomicGetPtr()
Fixes https://github.com/libsdl-org/SDL/issues/10601
2024-08-31 07:46:28 -07:00
Evan Hemsley 12ecdb9dde
GPU: Rename some awkwardly named functions (#10642) 2024-08-30 15:31:10 -07:00
Sam Lantinga b602c449e5 Remove SDL_SCALEMODE_BEST
Fixes https://github.com/libsdl-org/SDL/issues/10619
2024-08-30 10:30:14 -07:00
SDL Wiki Bot 04845bd39c Sync SDL3 wiki -> header 2024-08-30 13:27:33 +00:00
Sam Lantinga 138f3a3c91 Fixed documentation for SDL_SetAudioStreamGetCallback()
Fixes https://github.com/libsdl-org/SDL/issues/10633
2024-08-30 06:26:23 -07:00
Anonymous Maarten 88fe52df7b SDL_test: add --gpu option 2024-08-30 13:43:38 +02:00
Sam Lantinga f1b4c2bbbb Removed Unicode BOM from SDL_gpu.h 2024-08-29 18:03:59 -07:00
SDL Wiki Bot 9f0b23d3ad Sync SDL3 wiki -> header 2024-08-30 00:35:24 +00:00
Sam Lantinga d86f504637 Fix potential cases where we define SDL_GPU_* as an undefined symbol 2024-08-29 17:33:52 -07:00
Sam Lantinga 62f6e6b701 Removed the preferLowPower parameter from SDL_CreateGPUDevice() 2024-08-29 17:33:52 -07:00
Sam Lantinga 3046335f28 Fixed device creation property documentation formatting 2024-08-29 17:33:52 -07:00
Sam Lantinga b8e7ef27f3 Renamed GPU device creation properties 2024-08-29 17:33:52 -07:00
Sam Lantinga d70578b9aa Renamed Gpu to GPU 2024-08-29 17:33:52 -07:00
SDL Wiki Bot 717f4f6fb4 Sync SDL3 wiki -> header 2024-08-29 23:54:57 +00:00
Ryan C. Gordon 8ea38ebedc gpu: Fix wiki category capitalization. 2024-08-29 19:45:03 -04:00
SDL Wiki Bot 68038394d1 Sync SDL3 wiki -> header 2024-08-29 22:58:01 +00:00
cosmonaut 2e7d5bb429 Add the SDL_GPU API
Project Lead: Evan Hemsley <evan@moonside.games>

Co-designer, Metal Port, Console Ports:

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>

Production, QA, Debug:

Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>

SDL_Render Driver, Bugfixes:

Co-authored-by: Andrei Alexeyev <akari@taisei-project.org>

Additional D3D12 Programming, Bugfixes:

Co-authored-by: Bart van der Werf <bluelive@gmail.com>

Bugfixes and Feedback:

Co-authored-by: Zakary Strange <zakarystrange@gmail.com>
Co-authored-by: meyraud705 <meyraud705@gmail.com>
Co-authored-by: Joshua T. Fisher <playmer@gmail.com>
Co-authored-by: Topi Ritala <ritalat@fastmail.com>
Co-authored-by: David Gow <david@ingeniumdigital.com>

Original API Proposal:

Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
2024-08-29 15:57:29 -07:00
hwsmm 940f7535ef Remove SDL_PEN hints that are no longer used 2024-08-28 07:04:48 -07:00
Maia a24c164956 Fix trailing doc comments 2024-08-27 13:23:26 -07:00
SDL Wiki Bot 85bbc6028a Sync SDL3 wiki -> header 2024-08-27 17:33:28 +00:00
Sam Lantinga 47926d7bd0 Added a cleanup function for virtual joysticks 2024-08-27 10:31:46 -07:00
Sam Lantinga 00c409cff8 Additional cleanup exposed by building with a C++ compiler 2024-08-27 10:31:46 -07: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
Sam Lantinga fa2c9c46c5 Default SDL_HINT_JOYSTICK_GAMEINPUT to SDL_FALSE
This was causing crashes in IGameInput_RegisterSystemButtonCallback(), presumably on older systems with runtimes using a different function signature. We'll just disable it for now until the GameInput runtime has stabilized and we can tell when it's safe to use.
2024-08-23 11:34:15 -07:00
Sam Lantinga 8f546bb3c9 Use C99 bool internally in SDL 2024-08-22 13:30:02 -07:00
Sam Lantinga 9c7c0646c9 Fixed typo 2024-08-22 09:04:30 -07:00
Sam Lantinga 03ace96e5b Document that new surfaces are initialized to zero.
Fixes https://github.com/libsdl-org/SDL/issues/10577
2024-08-22 06:27:56 -07:00
Sam Lantinga d29276e625 Include SDL_events.h in SDL_init.h for SDL_AppEvent_func() 2024-08-20 07:53:07 -07:00
Ryan C. Gordon eb212ac4ed
main: Emscripten needs SDL_main_impl.h now that it has its own SDL_RunApp.
Reference PR #10171.
2024-08-18 23:54:55 -04:00
SDL Wiki Bot 1f34f35b25 Sync SDL3 wiki -> header 2024-08-19 00:55:27 +00:00
Ryan C. Gordon 9c5bd98a0f
assert: Added SDL_HINT_ASSERT.
Same environment variable, but now accessible as a formal SDL hint.

Reference PR #10171.
2024-08-18 20:53:55 -04:00
Ryan C. Gordon 42e43697cf
include: Minor SDL_AppResult documentation tweak. 2024-08-17 00:42:33 -04:00
SDL Wiki Bot 4147ff6a4e Sync SDL3 wiki -> header 2024-08-17 04:39:06 +00:00
Ryan C. Gordon 4c30e555fe
include: Clean up SDL_AppResult documentation. 2024-08-17 00:37:56 -04:00
Sam Lantinga 156aab2147 Added documentation for SDL_DisplayID and SDL_WindowID for consistency. 2024-08-16 15:46:43 -07:00
SDL Wiki Bot 4fbdbbbde6 Sync SDL3 wiki -> header 2024-08-16 22:22:07 +00:00
Sam Lantinga cb85894e94 Clarified device ID documentation
Fixes https://github.com/libsdl-org/SDL/issues/10558
2024-08-16 15:20:34 -07:00
SDL Wiki Bot ab53ff77bb Sync SDL3 wiki -> header 2024-08-16 18:17:21 +00:00
Sam Lantinga 438a214420 Changed main callback return values to an enumeration
Fixes https://github.com/libsdl-org/SDL/issues/10515
2024-08-16 11:16:05 -07:00
Sam Lantinga 83adcb9d38 Added SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER
This is undocumented since the individual flags are separate window creation properties, but it's useful to have a shared definition for this, which is used internally and for migrating code from SDL2.
2024-08-15 13:33:06 -07:00
Sam Lantinga d7b027a241 Namespace the object creation properties
Fixes https://github.com/libsdl-org/SDL/issues/10543
2024-08-15 12:56:04 -07:00
SDL Wiki Bot 0822d94631 Sync SDL3 wiki -> header 2024-08-15 14:29:23 +00:00
Kaktus514 3586df3151 Prefer downscaling in SDL_GetSurfaceImage.
This implements the ideas described in  #10536
2024-08-15 07:28:31 -07:00
Sam Lantinga 1a729251ad Added references to SDL_GetPixelFormatDetails() from the SDL_*RGB functions 2024-08-12 09:22:59 -07:00
Ryan C. Gordon 871d0074d2
SDL_GLattr: Added some documentation from SDL2. 2024-08-12 01:33:05 -04:00
Ryan C. Gordon bec701dd04
pen: Add support for tangential pressure axis. 2024-08-11 18:00:13 -04:00
SDL Wiki Bot a7fa375275 Sync SDL3 wiki -> header 2024-08-10 02:09:54 +00:00
Ryan C. Gordon a9d70dbacb pen: Rework public API.
This changes the API in various ways, and updates the backends for this.

Overall, this is a massive simplification of the API, as most future backends
can't support the previously-offered API.

This also removes the testautomation pen code (not only did these interfaces
change completely, it also did something no other test did: mock the internal
API), and replaces testpen.c with a different implementation (the existing
code was fine, it was just easier to start from scratch than update it).
2024-08-09 22:09:23 -04:00
SDL Wiki Bot 78b1e0e299 Sync SDL3 wiki -> header 2024-08-09 16:57:18 +00:00
Sam Lantinga c2085dad8f Added SDL_HINT_JOYSTICK_GAMEINPUT 2024-08-09 09:56:47 -07:00
Sam Lantinga 4cc3410dce Added SDL_GetAudioFormatName()
Fixes https://github.com/libsdl-org/SDL/issues/10489
2024-08-08 15:05:37 -07:00
SDL Wiki Bot d2bdfd7792 Sync SDL3 wiki -> header 2024-08-08 17:56:53 +00:00
Frank Praznik ae8065e1ec Use more stringent criteria for entering warp emulation mode
Require more than one warp to the window center within a certain timespan (currently 30ms, but can be tweaked) to better avoid erroneously entering warp emulation mode.

This also correctly resets the warp emulation mode activation if the window loses and regains focus.
2024-08-08 10:56:20 -07:00
Sam Lantinga 058781f514 Include GameInput.h as gameinput.h for compatibility with non-MSVC toolchains 2024-08-08 09:14:38 -07:00
Anonymous Maarten 8714de9f46 SDL_GetAudioStreamAvailable and SDL_GetAudioStreamAvailable return error codes 2024-08-08 10:11:39 +00:00
Sam Lantinga a38cd7a067 Added checks for GameInput.h to the build system 2024-08-07 17:57:33 -07:00
SDL Wiki Bot 212f7cc355 Sync SDL3 wiki -> header 2024-08-07 19:19:43 +00:00
Sam Lantinga 001dbc5da8 Added support for raw mouse and keyboard using GameInput on Windows
Fixes https://github.com/libsdl-org/SDL/issues/10442
2024-08-07 12:19:09 -07:00
Sylvain 20a6193eaa Run test suites and test cases in non-linear order (see libsdl-org#9303) 2024-08-07 10:25:30 +02: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
SDL Wiki Bot 57fa3bc08e Sync SDL3 wiki -> header 2024-08-06 15:00:23 +00:00
Sam Lantinga 627cb8acd0 SDL_EventFilter functions now return SDL_bool 2024-08-06 07:59:45 -07:00
Sam Lantinga 57f9c6f7bb Renamed SDL_Get/SetRelativeMouseMode to SDL_Get/SetWindowRelativeMouseMode()
Fixes https://github.com/libsdl-org/SDL/issues/10041
2024-08-06 07:59:45 -07:00
Sam Lantinga a1998d106d Putting the simple back into Simple DirectMedia Layer 2024-08-05 21:20:26 -07:00
SDL Wiki Bot 0d3db8390d Sync SDL3 wiki -> header 2024-08-06 02:47:18 +00:00
Sam Lantinga afec46dbee Re-added SDL_GetScancodeFromKey() 2024-08-05 19:46:45 -07:00
Sam Lantinga a13c993e40 Removed keymaps from the API
This is unnecessary complication for applications. We can always add it again later if we find that it's really useful.
2024-08-05 19:46:45 -07:00
SDL Wiki Bot 1966472f73 Sync SDL3 wiki -> header 2024-08-06 00:02:59 +00:00
Sam Lantinga c298a3749b Expose the keymap separately from the event keycode
This adds functions to query the keymap:
* SDL_GetCurrentKeymap()
* SDL_GetKeymapKeycode()
* SDL_GetKeymapScancode()
* SDL_ReleaseKeymap()

and these are distinct from the function to query the event keycode associated with a scancode, which might be affected by SDL_HINT_KEYCODE_OPTIONS.

Also added an SDL_bool parameter to SDL_GetKeyName() and SDL_GetKeyFromName() to enable upper case handling of the name.
2024-08-05 17:02:25 -07:00
Sam Lantinga d223264f17 Updated the documentation for SDL_HINT_KEYCODE_OPTIONS 2024-08-05 10:17:48 -07:00
SDL Wiki Bot ad27d73a19 Sync SDL3 wiki -> header 2024-08-05 16:03:59 +00:00
Sam Lantinga 6161c437c7 Added SDL_SetLogPriorityPrefix()
SDL_Log() no longer prints a log prefix by default for SDL_LOG_PRIORITY_INFO and below. The log prefixes can be customized with SDL_SetLogPriorityPrefix().
2024-08-05 09:02:50 -07:00
Ryan C. Gordon 074dd8c35f
hints: Change hints to be backed by Properties, add documentation. (#9892)
This makes the subsystem thread-safe, more performant, and cleans up the code a little.

Also removed SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS, since setting this hint programmatically initializes properties, which creates a lock, so we can't check hints while creating locks. The slim reader-writer locks have been the default for ages and are solid, so we'll just use those when available.
2024-08-05 09:02:28 -07:00
SDL Wiki Bot e3682995f5 Sync SDL3 wiki -> header 2024-08-05 15:54:41 +00:00
Sam Lantinga 746b8eb14b Added SDL_HINT_MUTE_CONSOLE_KEYBOARD 2024-08-05 08:54:10 -07:00
Sam Lantinga afde1cc9c2 Added SDL_HINT_EVDEV_DEVICES 2024-08-05 08:54:10 -07:00
Sam Lantinga 0da346f129 Added SDL_HINT_HIDAPI_LIBUSB, SDL_HINT_HIDAPI_LIBUSB_WHITELIST, and SDL_HINT_HIDAPI_UDEV 2024-08-05 08:54:10 -07:00
Sam Lantinga d9f9e9e764 Added SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES and SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES 2024-08-05 08:54:10 -07:00
Sam Lantinga a97dadf779 Added hints to replace environment variables on the PlayStation Vita 2024-08-05 08:54:10 -07:00
Sam Lantinga 3669d1e76a Added SDL_HINT_VULKAN_DISPLAY 2024-08-05 08:54:10 -07:00
Sam Lantinga 997df06320 Added SDL_HINT_X11_XCB_LIBRARY 2024-08-05 08:54:10 -07:00
Sam Lantinga 175f28f59f Added SDL_HINT_VIDEO_X11_NODIRECTCOLOR 2024-08-05 08:54:10 -07:00
Sam Lantinga 8cde570ad9 Added SDL_HINT_VIDEO_X11_VISUALID 2024-08-05 08:54:10 -07:00
Sam Lantinga 05f870f20d Added SDL_HINT_OPENGL_LIBRARY and SDL_HINT_VULKAN_LIBRARY 2024-08-05 08:54:10 -07:00
Sam Lantinga c9b2bfa7c1 Added SDL_HINT_AUDIO_DISK_INPUT_FILE, SDL_HINT_AUDIO_DISK_OUTPUT_FILE, and SDL_HINT_AUDIO_DISK_TIMESCALE 2024-08-05 08:54:10 -07:00
Sam Lantinga e1ee0e748d Added SDL_HINT_WAVE_CHUNK_LIMIT 2024-08-05 08:54:10 -07:00
Sam Lantinga f05cd85048 Added SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE 2024-08-05 08:54:10 -07:00
Sam Lantinga 71574ac985 Added SDL_HINT_AUDIO_DUMMY_TIMESCALE 2024-08-05 08:54:10 -07:00
Sam Lantinga 5aa1a48ac3 Added SDL_HINT_AUDIO_FREQUENCY, SDL_HINT_AUDIO_CHANNELS, and SDL_HINT_AUDIO_FORMAT 2024-08-05 08:54:10 -07:00
Sam Lantinga 0a6bab3ac7 Added SDL_CreateRenderer to the "see also" for SDL_RenderPresent() 2024-08-05 07:56:29 -07:00
SDL Wiki Bot 6212497ea3 Sync SDL3 wiki -> header 2024-08-05 03:00:45 +00:00
Sam Lantinga b1af91e788 Clarified timer documentation
Fixes https://github.com/libsdl-org/SDL/issues/10079
2024-08-04 19:44:13 -07:00
SDL Wiki Bot a699ff2419 Sync SDL3 wiki -> header 2024-08-04 17:49:28 +00:00
Sam Lantinga bc1c3f826f Added SDL_HINT_LOGGING documentation to the logging category page.
Fixes https://github.com/libsdl-org/SDL/issues/10335
2024-08-04 10:48:42 -07:00
SDL Wiki Bot 454c85ad51 Sync SDL3 wiki -> header 2024-08-04 17:39:54 +00:00
Sam Lantinga 6da4278d37 Clarify how to check for EOF in SDL_ReadIO() documentation.
Fixes https://github.com/libsdl-org/SDL/issues/8564
2024-08-04 10:37:51 -07:00
Sam Lantinga ef6521aee7 testnative: print events with --info event 2024-08-04 09:07:19 -07:00
SDL Wiki Bot cb440ec4a4 Sync SDL3 wiki -> header 2024-08-03 13:40:37 +00:00
Sam Lantinga cd5f0d2cce Added SDL_RectToFRect() 2024-08-03 06:40:06 -07:00
SDL Wiki Bot 2f24e9c2f2 Sync SDL3 wiki -> header 2024-08-03 13:30:08 +00:00
SDL Wiki Bot b5c0921196 Sync SDL3 wiki -> header 2024-08-03 02:37:43 +00:00
Anonymous Maarten f57c597c60 Added SDL_GetWindowFromEvent 2024-08-03 02:37:11 +00:00
SDL Wiki Bot e058aa6d65 Sync SDL3 wiki -> header 2024-08-02 21:50:11 +00:00
Sam Lantinga 50492e1d03 Change the text input defaults to match the natural input experience 2024-08-02 14:49:37 -07:00
Sam Lantinga 81f8e6aba6 Added SDL_StartTextInputWithProperties()
This allows you to customize the text input so you can have numeric text entry, hidden passwords, etc.

Fixes https://github.com/libsdl-org/SDL/issues/7101
Fixes https://github.com/libsdl-org/SDL/issues/7965
Fixes https://github.com/libsdl-org/SDL/issues/9439
2024-08-02 14:49:37 -07:00
SDL Wiki Bot f01d4278c6 Sync SDL3 wiki -> header 2024-08-01 20:49:00 +00:00
Sam Lantinga 31ed3665ad Added support for high-DPI cursors and icons
Fixes https://github.com/libsdl-org/SDL/issues/9838
2024-08-01 13:48:28 -07:00
Sam Lantinga 94d9229ce2 Added SDL_AddSurfaceAlternateImage(), SDL_SurfaceHasAlternateImages(), SDL_GetSurfaceImages() and SDL_RemoveSurfaceAlternateImages()
These functions allow you to create surfaces with alternate high DPI content, and will be used for high DPI icon and cursor support.
2024-08-01 13:48:28 -07:00
Sam Lantinga 22ffb487d0 Added SDL_ScaleSurface() 2024-08-01 13:48:28 -07:00
Anonymous Maarten 68fb07787b cmake: Remove HAVE_D3D12_H from sources and introduce SDL_RENDER_D3D(11|12) 2024-08-01 17:49:02 +00:00
SDL Wiki Bot 2e058ba7a4 Sync SDL3 wiki -> header 2024-08-01 05:37:11 +00:00
Sam Lantinga a5f18048b2 Extend the 9-grid functions to handle a non-uniform grid layout (thanks @zaun!)
Fixes https://github.com/libsdl-org/SDL/issues/10389
2024-07-31 22:36:39 -07:00
Sam Lantinga a6407e88da Document the events that need to be handled in a callback 2024-07-30 07:52:13 -07:00
Sam Lantinga 691cf15e75 Removed the ancient Android audio driver
OpenSLES is well supported on Android 4.0 and later.
2024-07-29 08:05:36 -07:00
SDL Wiki Bot 3b01a0b884 Sync SDL3 wiki -> header 2024-07-29 11:26:36 +00:00
Sam Lantinga 61a88077a7 Re-added SDL_HINT_APP_ID and SDL_HINT_APP_NAME 2024-07-29 07:26:03 -04:00
Sam Lantinga 383ccb2b6a Finish removing SDL_DECLSPEC_FREE 2024-07-28 08:06:20 -07:00
Sam Lantinga 728bf363cb Make sure we call SDL_Quit() before SDLTest_CommonDestroyState()
Otherwise we'll report leaks that will be cleaned up in SDL_Quit()
2024-07-28 08:05:31 -07:00
Sam Lantinga b5ad74998b Removed SDL_DECLSPEC_FREE 2024-07-28 07:24:21 -07:00
SDL Wiki Bot 18fe89e036 Sync SDL3 wiki -> header 2024-07-28 14:23:13 +00:00
Sam Lantinga a36fe632fd
Added SDL_SetAppMetadata() (#10404)
Removed duplicate hints SDL_HINT_APP_NAME, SDL_HINT_APP_ID, and
SDL_HINT_AUDIO_DEVICE_APP_NAME.

Wired up a few things to use the metadata; more to come!

Fixes https://github.com/libsdl-org/SDL/issues/4703
2024-07-28 07:22:46 -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
SDL Wiki Bot 0f2fc2fbaa Sync SDL3 wiki -> header 2024-07-27 03:59:43 +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 2137e6eed1 Sync SDL3 wiki -> header 2024-07-26 17:05:33 +00:00