Commit graph

764 commits

Author SHA1 Message Date
Sam Lantinga
e08f34c3be Removed SDL_HINT_MOUSE_RELATIVE_MODE_WARP
This complicated mouse handling and is a rarely tested path. Real relative mode is much better performance and higher precision.
2024-12-19 10:33:02 -08:00
SDL Wiki Bot
c52a96ca8e Sync SDL3 wiki -> header
[ci skip]
2024-12-17 07:29:13 +00:00
Ryan C. Gordon
2635239bbc
README-migration: some improvements to the audio section.
Minor edit about default devices, and an explanation of forcing device buffer
size with SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES.

Fixes #9857.
2024-12-12 01:29:56 -05:00
Ryan C. Gordon
f45ce45603 ngage: Remove Nokia N-Gage support.
This can be reverted if a toolchain arrives that can handle C99 features like
variables declared in the middle of a scope, but for now we literally can't
compile SDL3 for this platform.

Fixes #11243.
2024-12-11 13:29:43 -05:00
Sam Lantinga
09428688b9 Added a reminder to sign the source archives when creating a release 2024-12-07 11:50:42 -08:00
Sam Lantinga
ddb1e66d90 Updated the release checklist documentation 2024-12-06 20:18:30 -08:00
Ryan C. Gordon
022a6a9f97 asyncio: Added Linux io_uring support. 2024-12-03 17:32:20 -05:00
Ryan C. Gordon
d53241a299
docs/README-main-functions.md: reformatted Best Practices section. 2024-11-28 00:19:55 -05:00
SDL Wiki Bot
5cd188bdbc Sync SDL3 wiki -> header
[ci skip]
2024-11-28 05:17:28 +00:00
anakin004
7099de4ae8 Update README-main-functions.md 2024-11-28 00:16:55 -05:00
Ryan C. Gordon
a0591ec4a3
README-documentation-rules.md: Mention not listing types in param/returns docs. 2024-11-20 23:59:24 -05:00
Ryan C. Gordon
6ca8269b96
docs/README-raspberrypi.md: Corrected NEON information (thanks, @cmitu!). 2024-11-14 12:11:29 -05:00
Ryan C. Gordon
6049ca4fb1
docs/README-raspberrypi.md: Initial updates.
This document needs a _lot_ of modernization! This was just some initial
improvements, and a warning that the rest is probably obsolete.

Fixes #11444.
2024-11-13 19:55:25 -05:00
Petar Popovic
96729e745a SDL_GetClosestFullscreenDisplayMode(): Rename parameter mode to closest
Also: Check, if the parameter is NULL inside the function.
2024-11-03 21:03:44 -08:00
Sam Lantinga
27f69c772c Updated the release checklist
This will help me remember to create the archives _after_ tagging the release.
2024-11-01 19:40:47 -07:00
M. P. Halpin
6c10446a6c Add version info when building CI/CD for apple platforms 2024-10-30 09:07:30 -07:00
Glenn Watson
5c3d42aade Update README-linux.md for openSUSE Tumbleweed dependencies 2024-10-27 08:01:13 -07:00
Roman Frołow
97b924f985 typo: maxOS -> macOS 2024-10-26 01:59:44 +02:00
Son Phan Trung
c0bad724a7 README-ios.md: Add info about UIApplicationSupportsIndirectInputEvents on iOS 17 2024-10-24 07:36:45 -07:00
Ryan C. Gordon
7108291d0b video: Change SDL_GLattr to SDL_GLAttr. 2024-10-23 18:50:52 -04:00
Ryan C. Gordon
c0e9205a92 video: Change capitalization on various OpenGL attribute typedefs. 2024-10-23 18:50:52 -04:00
SDL Wiki Bot
4e33440c04 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 20:59:19 +00:00
Anonymous Maarten
e8b69b03fe
cmake: fail configuring when no X11 or wayland could be found (#11310)
It's still possible to build SDL by configuring with -DSDL_NO_UNIX_DESKTOP_SANITY_CHECK=ON
2024-10-23 20:19:40 +00:00
Michael Palomas
21c91d5535 examples now using SDL_ALPHA_OPAQUE(_FLOAT) for opaque alpha value 2024-10-23 07:28:33 -07:00
anton-kl
f9bffa31b6 docs: fix window flags in README-migration.md
Use correct SDL macro instead of invalid "flags" string.
Also add a comment about preferred approach.
2024-10-22 00:17:06 -07:00
Ryan C. Gordon
b0982e8982
docs: Updated README-emscripten.md.
This now mentions the main callbacks as a possible option, and removes the
part about prebuilt libraries. The latter can return when Emscripten packages
SDL3.

Fixes #11080.
2024-10-21 23:38:40 -04:00
SDL Wiki Bot
5f874b60a8 Sync SDL3 wiki -> header
[ci skip]
2024-10-19 14:49:21 +00:00
Anonymous Maarten
1647d36aec
docs: document copying shared SDL3 a bit more + document sanitizer/libc incompatibility 2024-10-19 14:48:51 +00:00
Anonymous Maarten
69433ee075 doc: explain build-scripts/create-release.py in the release checklist 2024-10-16 18:43:15 +02:00
Frank Praznik
553fc5fe0e wayland: Expose displays in a deterministic order, and attempt to better handle selecting a primary display.
Wayland can expose displays in any arbitrary order, and doesn't have the native concept of a primary display. However, there are games that presume that the first listed display is the primary, which can lead to problems if that output isn't necessarily the ideal one, as they may use that display to build a resolution list or as the default fullscreen output. This sorts displays by position, then attempts to find the primary display, first by querying the explicit ordering hint, then the GNOME DBus property, then tries to determine the 'best' display according to the criteria that is generally ideal for games and media playback.

The makes the list of displays deterministic, as long as the desktop configuration remains static, with a reasonably appropriate one prioritized as primary, even if there is no explicit way to retrieve the primary display. In the case where a user has a particularly esoteric physical display configuration, the new hint enables explicitly overriding the sorting and selection logic, allowing the entire display order to be customized, if necessary.
2024-10-15 13:52:35 -04:00
Anonymous Maarten
45dfdfbb7b Add parametrized build script
[ci skip]
2024-10-14 21:30:48 +02:00
Daniel Gibson
9a81892447 Old env vars as fallback for SDL_VIDEO_DRIVER + SDL_AUDIO_DRIVER #11115
especially SDL_VIDEODRIVER is commonly used to use the native Wayland
backend, so I think it's a good idea to keep supporting the old name
instead of forcing users to find out that they now have to add an
underscore..
Not sure how popular SDL_AUDIODRIVER is, but with all the audio backends
that exist on Linux alone I'm sure some people use it to work around
sound issues.

Note: Doing this in the SDL_hints implementation instead of the
call-sites of SDL_GetHint(SDL_HINT_VIDEO_DRIVER) etc ensures that
1. Hint priorities work (env var overriding hint set by application with normal
   priority, but not when application used SDL_HINT_OVERRIDE)
2. SDL_ResetHint() (called by user code) respects the fallback
   environment variable
2024-10-12 08:47:02 -07:00
SDL Wiki Bot
b676413657 Sync SDL3 wiki -> header
[ci skip]
2024-10-11 20:51:42 +00:00
expikr
48ff3efdb9
Clarify README-highdpi.md (#10083) 2024-10-11 13:50:37 -07:00
Sam Lantinga
6c64c62114 Rename SDL_BUTTON() to SDL_BUTTON_MASK()
Fixes https://github.com/libsdl-org/SDL/issues/11056
2024-10-04 09:13:59 -07:00
Sam Lantinga
fe2880fcda Rename SDL_SetThreadPriority() to SDL_SetCurrentThreadPriority()
Fixes https://github.com/libsdl-org/SDL/issues/11055
2024-10-04 08:57:03 -07:00
Frank Praznik
07fd88d241
docs: Fix migration documentation for SDL_WINDOWEVENT_SIZE_CHANGED
Mark the event as removed as there is no true direct mapping in SDL3, and inform clients that they should handle the explicit SDL_EVENT_WINDOW_RESIZED and SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED events instead.
2024-10-03 12:34:26 -04:00
Sam Lantinga
91b074beb7 Removed SDL_IPHONE_MAX_GFORCE
We no longer support interpreting the accelerometer as a joystick.

Fixes https://github.com/libsdl-org/SDL/issues/11005
2024-10-01 18:00:22 -07:00
Anthony
5f5379dc99
Add SDL_IsTV() (#11004)
Moved SDL_IsAndroidTV() out of public API, to match SDL_IsAndroidTablet().

Added SDL_IsTV(), to mirror existing SDL_IsTablet().
2024-10-01 09:20:00 -07:00
Ryan C. Gordon
0b5e01a305 loadso: library handles are now SDL_SharedObject* instead of void*.
Improved the SDL_loadso.h documentation a little, too.

Fixes #11009.
2024-10-01 12:16:10 -04:00
Ryan C. Gordon
1787d6ca5c main: SDL_AppQuit() now reports the result value.
Fixes #10994.
2024-09-29 23:24:04 -04:00
Ryan C. Gordon
0e2c4e407a
README-migration: note that logical presentation state is different from SDL2. 2024-09-26 18:49:29 -04: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
bd04459cde Fix typos (thanks @qndel!)
Fix typos in comments and in one case in a returned error ("insuffient -> insufficient" fb273eb)
codespell src/ *.cpp *.h *.hpp --ignore-words-list unknwn,thid,algebric,statics,pixelX,pEvents,caf,ptd,parms,pEvent,parm,TextureRS,TE,HDA,LOD,datas,UE,xwindows,IIF
cd src; git checkout \
    events/imKStoUCS.* \
    hidapi \
    joystick/controller_type.c \
    joystick/controller_type.h \
    joystick/hidapi/steam/controller_constants.h \
    joystick/hidapi/steam/controller_structs.h \
    libm \
    stdlib/SDL_malloc.c \
    stdlib/SDL_qsort.c \
    stdlib/SDL_strtokr.c \
    video/khronos \
    video/x11/edid.h \
    video/x11/edid-parse.c \
    video/x11/xsettings-client.* \
    video/yuv2rgb
2024-09-18 08:18:26 -07:00
Sam Lantinga
8d223b3037 Renamed atomic functions to match SDL 3.0 naming convention
This will also allow us to cleanly add atomic operations for other types in the future.
2024-09-17 08:53:27 -07:00
Sam Lantinga
f3e419596b Removed SDL_INIT_TIMER
This is no longer necessary before calling SDL_AddTimer()
2024-09-17 08:53:27 -07:00
Sam Lantinga
28b94c4758 Re-added SDL_getenv() as a thread-safe getenv() implementation 2024-09-15 09:37:04 -07:00
Carl Åstholm
1f3fd65c4c cpuinfo: Rename SDL_GetCPUCount to SDL_GetNumLogicalCPUCores
This was the only API that broke the "GetNumThings" convention
used elsewhere, so renaming it helps with consistency.
Adding "logical cores" to the name also makes it a bit
more immediately obvious what the count actually represents.
2024-09-14 19:33:30 -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
Sam Lantinga
37c9fb490e Changed enums to use XXX_COUNT for the count or number of values
Fixes https://github.com/libsdl-org/SDL/issues/10763
2024-09-11 09:32:17 -07:00