Commit Graph

14940 Commits (df0f5deddfd6ebb94a6a0ed828c809d5f5dcdb61)

Author SHA1 Message Date
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
Anonymous Maarten f8c2ec5462 testffmpeg: use Uint64 instead of __u64 2024-03-15 21:26:40 +01:00
Petar Popovic 2b45452dd5 Adding comments to init-flags SDL_INIT_AUDIO and SDL_INIT_SENSOR that they imply SDL_INIT_EVENTS
When initializing SDL with the flag SDL_INIT_AUDIO or SDL_INIT_SENSOR the event subsystem also gets initialized(SDL_INIT_EVENTS). This isn't mentioned in the comments.
This commit adds these two comments.
2024-03-15 13:10:49 -07:00
SDL Wiki Bot fa7ec59ecd Sync SDL3 wiki -> header 2024-03-15 19:59:26 +00:00
Ryan C. Gordon ec6de7017c
Merge pull request #9254 from icculus/sdl3-rwops-hidden-interface
rwops: Reworked RWops for SDL3. Now it's SDL_IOStream!
2024-03-15 15:58:41 -04:00
Ryan C. Gordon b7cda16613
iostream: Final fixes before merging.
- SDL_GetRWProperties -> SDL_GetIOProperties
- SDL_GetRWStatus -> SDL_GetIOStatus
- Some documentation corrections and improvements.
2024-03-15 15:37:03 -04:00
Ryan C. Gordon c175eb488c
iostream: Note that the new name has nothing to do with C++'s iostream class. 2024-03-15 01:16:31 -04:00
Ryan C. Gordon 5a21d87e69
rwops: Changed filenames that reference "rwops" to "iostream". 2024-03-14 23:30:59 -04:00
Ryan C. Gordon 6776b6108a
iostream: "free*" params should be "closeio". 2024-03-14 23:14:46 -04:00
Ryan C. Gordon 5440fd7d12
README-migration.md: Fixed some RWops mistakes. 2024-03-14 23:13:26 -04:00
Ryan C. Gordon 3a344cf877
rwops: Fixed some SDL2 symbols that got missed. 2024-03-14 21:57:21 -04:00
Ryan C. Gordon 5f64cc511e
rwops: Fixed build on Android. 2024-03-14 19:38:15 -04:00
Ryan C. Gordon fc7afa9cbf
rwops: Renamed SDL_RWops to SDL_IOStream, and other related symbols. 2024-03-14 19:38:12 -04:00
Ryan C. Gordon fe33b2a81b
rwops: Give implementations access to status value. 2024-03-14 19:37:07 -04:00
Ryan C. Gordon 447c29e65c
include: Added missing RWops documentation. 2024-03-14 19:37:07 -04:00
Ryan C. Gordon cc58da4c63
rwops: Add SDL_GetRWStatus, make the statuses into an enum. 2024-03-14 19:37:06 -04:00
Ryan C. Gordon e35c304022
rwops: Add properties for some of the internal implementation details. 2024-03-14 19:37:05 -04:00