Commit Graph

15006 Commits (208cd434b556e8948bec09fab8c12b6789ba5b6b)

Author SHA1 Message Date
Sam Lantinga 24ec1c09b9 Renamed SDL_PROP_IOSTREAM_STDIO_HANDLE_POINTER to SDL_PROP_IOSTREAM_STDIO_FILE_POINTER 2024-03-18 21:56:11 -07:00
Cameron Gutman d3a785e521 Improve event processing latency when gamepad/sensor is open
By using the SDL_WaitEventTimeout_Device() path even when polling is required,
we can still achieve sub-millisecond latency for non-gamepad/sensor events when
a gamepad or sensor is in use by the application.
2024-03-18 21:52:42 -07:00
Frank Praznik 1eb7b79986 video: Prepend global video property with "SDL" 2024-03-18 21:52:39 -04:00
Sam Lantinga 784311c20e Fixed duplicate SDL_Version change 2024-03-18 13:59:03 -07:00
Anonymous Maarten 009318c5a9 Fix warnings when building with -DSDL_LIBC=OFF on Linux 2024-03-18 21:29:08 +01:00
Anonymous Maarten f59dbf6a12 cmake: add -Wimplicit-fallthrough warning 2024-03-18 20:34:50 +01:00
Sam Lantinga 086a7a4687 Fixed signed/unsigned comparison warning 2024-03-18 09:48:45 -07:00
Sam Lantinga 491f18eea3 Fixed uninitialized signal_id
Also removed unnecessary SDL_OutOfMemory() calls

Fixes https://github.com/libsdl-org/SDL/issues/9300
2024-03-18 09:12:51 -07:00
Sam Lantinga 90e2551c4f Sort the SDL API symbols
API renames are almost complete, let's prepare for a preview release
2024-03-18 09:03:36 -07:00
SDL Wiki Bot 0d0aaa2d75 Sync SDL3 wiki -> header 2024-03-18 15:57:23 +00:00
Sam Lantinga 92d01ef12a You can pass NULL to SDL_GetPathInfo() and SDL_GetStoragePathInfo() to test for the existence of a file. 2024-03-18 08:56:24 -07:00
Frank Praznik ebb6582534 wayland: Handle the toplevel export property as a string
xdg-toplevel export handles are strings, so treat the property as one. Avoids the need to manually manage the string pointer.
2024-03-18 11:41:02 -04:00
Petar Popovic 9072b994f7 src/filesystem/unix/SDL_sysfilesystem.c add <stdio.h> inclusion
gets rid of some warnings
2024-03-18 15:55:40 +03:00
Mathieu Eyraud 6af979975f Add missing break 2024-03-18 15:55:14 +03:00
SDL Wiki Bot fc26d5d328 Sync SDL3 wiki -> header 2024-03-18 04:28:30 +00:00
Sam Lantinga a1a0156756 Renamed SDL_SizeIO() SDL_GetIOSize() 2024-03-18 00:27:18 -04:00
Sam Lantinga df0f5deddf Added SDL_IOFromDynamicMem() 2024-03-18 00:27:18 -04:00
rofl0r 12245e4c75 PSP/Joystick: fix formatting
(cherry picked from commit c17d2246fb0ed2fa5b16acbf1f2b3aa7e5ddd3cf)
2024-03-17 13:23:51 -07:00
rofl0r 7169db1e62 PSP: don't block on joystick event query
using the blocking sceCtrlReadBufferPositive() effectively turns SDL_PollEvent() into WaitForVblank(), because the functions does exactly that if no input is buffered.
due to this, calling SDL_PollEvent() once per frame averaged in 7 ms delay out of the available 16ms budget to get a frame calculated and drawn to achieve 60 fps.

(cherry picked from commit 86f223d66426ad1a42db156d1f1d155ad987959b)
2024-03-17 13:23:51 -07:00
Sam Lantinga 747300b356 SDL file times are 64-bit integers representing nanoseconds since the Unix epoch 2024-03-17 13:21:04 -07:00
Sam Lantinga 9153287fa0 Added storage filesystem operations to the exported function list 2024-03-17 13:02:52 -07:00
SDL Wiki Bot e7b9f75e62 Sync SDL3 wiki -> header 2024-03-17 19:29:22 +00:00
Sam Lantinga d65ae710a1 Renamed SDL_LogGetOutputFunction() and SDL_LogSetOutputFunction() to match SDL 3.0 naming convention 2024-03-17 12:28:11 -07:00
Sam Lantinga d8a54cd4f8 Updated "see also" references to be more consistent
Fixes https://github.com/libsdl-org/SDL/issues/9282
2024-03-17 12:28:11 -07:00
Sam Lantinga d972244d3a Added a mapping for the Defender Joystick Cobra R4 (thanks @kotenok2000!) 2024-03-17 12:13:21 -07:00
Sam Lantinga 4697153d1e Use the CRC as part of the unique key for mappings 2024-03-17 12:13:21 -07:00
Ryan C. Gordon 9d83c0a65d filesystem: Rename some internal symbols to remove "FSops" terminology.
This removes the "FSops" naming scheme, which was meant to mirror the
"RWops" naming scheme, which was also recently removed from SDL3.

The build system defines (`SDL_FSOPS_POSIX`, etc) and the source code
filenames retain this, because there's already things using the word
"filesystem" that might overlap (for example, lots of things have a
unique "SDL_sysfilesystem.c", to query base dirs, etc, but almost
everything uses the POSIX "SDL_sysfsops.c" source code.

Fixes #9288.
2024-03-17 14:20:11 -04:00
Petar Popovic 4ecea42fb0 testautomation_math.c: use isinf(V) instead of fpclassify(V) == FP_INFINITE
Using fpclassify can cause a linker error.
Using isinf instead fixes this.
2024-03-17 11:12:09 -07:00
Frank Praznik cb39740cfd wayland: Remove additional instance of setting the viewport source rect 2024-03-17 13:10:48 -04:00
SDL Wiki Bot a206e1e3c0 Sync SDL3 wiki -> header 2024-03-17 15:40:25 +00:00
Sam Lantinga 2f78e5f321 All storage interface functions are optional
If an application is creating custom storage, presumably they'll implement the functions they need.
2024-03-17 08:39:43 -07:00
Sam Lantinga f460f42e70 Added filesystem operations to SDL_Storage 2024-03-17 08:39:43 -07:00
Sam Lantinga 7a088527c1 Removed the reserved parameter from SDL_EnumerateDirectoryCallback
If someone needs to, say, include an SDL_Storage object, they can simply point userdata at a structure that includes the the storage and any other data needed in enumeration.
2024-03-17 08:39:43 -07:00
Sam Lantinga ec3ba387d1 Added SDL_OpenFileStorage() for local file storage 2024-03-17 08:39:43 -07:00
Sam Lantinga ee0a23c7ab The storage ready callback is optional 2024-03-17 08:39:43 -07:00
Sam Lantinga db0c1d7aeb Added portable file and directory operations (thanks @icculus!) 2024-03-17 08:39:43 -07:00
Sam Lantinga fe5c34d4bd Renamed storage functions to match SDL 3.0 naming convention 2024-03-17 08:39:43 -07:00
Frank Praznik 1bab87399f wayland: Always use the entire buffer for the viewport source
Not doing so can result in protocol errors if the viewport source region is updated and a buffer with the old, smaller dimensions is committed.
2024-03-17 10:44:10 -04:00
Anonymous Maarten e5812a9fd2 testpen: don't include math.h 2024-03-16 20:37:31 +01:00
Anonymous Maarten 2f13f66c71 testautomation: fix renderer leak in video tests 2024-03-16 11:59:04 -07:00
SDL Wiki Bot 9ccde0def4 Sync SDL3 wiki -> header 2024-03-16 14:20:24 +00:00
Ethan Lee 744227e6ab Add SDL_storage 2024-03-16 07:19:50 -07:00
Sam Lantinga 4fc749443f Added dialog files to the Xcode build 2024-03-15 16:27:02 -07:00
Sam Lantinga 25c64a954d Removed UIKit_SetWindowMouseGrab(), mouse grab isn't supported on iOS 2024-03-15 16:26:40 -07:00
Sam Lantinga 41e187be4f Adjust Steam button names to match SDL 2024-03-15 16:05:19 -07:00
Anonymous Maarten 572e088b8f SDL_IOFromMem/SDL_IOFromConstMem: free userdata on close 2024-03-15 23:55:29 +01:00
Frank Praznik ea60c2079b dialog: Pass the Wayland or X11 parent window handle to the file dialog portal
Pass the Wayland window export string in the form "wayland:<handle string>" or the X11 window XID in the form "x11:<XID in hex>" to the file dialog portal, so that the window manager can associate the dialog with the parent window and position it correctly.
2024-03-15 18:30:05 -04:00
Frank Praznik d523cd069f dialog: Detect if the file chooser portal is available
Use the introspection method to detect if the file chooser portal is available.
2024-03-15 18:30:05 -04:00
Frank Praznik 19764ffcc8 wayland: Add the xdg-foreign-unstable-v2 protocol
Add the xdg-foreign-unstable-v2 protocol and use it to create export handles for toplevel windows, which will be used when an external component, such as the file chooser portal, requires it.
2024-03-15 18:30:05 -04:00
Anonymous Maarten db31367999 testffmpeg: use SDL_free instead of free 2024-03-15 21:26:40 +01:00