Commit graph

237 commits

Author SHA1 Message Date
Ryan C. Gordon
1f54b228ff
video: Convert some EGL environment variables to SDL hints.
Fixes #10479.
2025-01-06 11:15:26 -05:00
SDL Wiki Bot
9b40d43b1f Sync SDL3 wiki -> header
[ci skip]
2025-01-03 22:37:37 +00:00
Frank Praznik
85851459d6
docs: Note that using the Wayland display scaling mode can have imprecision when positioning due to unit conversion and rounding 2025-01-03 17:36:36 -05:00
Sam Lantinga
c077b7a918 Fixed the version availability of SDL_HINT_JOYSTICK_ENHANCED_REPORTS 2025-01-02 17:28:45 -08:00
SDL Wiki Bot
0b520cd4b4 Sync SDL3 wiki -> header
[ci skip]
2025-01-03 01:18:56 +00:00
Sam Lantinga
2c0a8363a5 Added SDL_HINT_JOYSTICK_ENHANCED_REPORTS
This hint defaults on, enabling advanced controller features.

This replaces SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE and SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, and is supported by PlayStation and Nintendo Switch controllers.

Fixes https://github.com/libsdl-org/SDL/issues/10086
2025-01-02 17:18:09 -08:00
Sam Lantinga
4797970bfa Enable SDL_HINT_JOYSTICK_THREAD by default
If you're not using SDL for video you won't get raw input messages without this hint, and this is tripping up enough people it makes sense to have this enabled by default. There isn't much downside to this, other than having another thread processing Xbox controller input.

Fixes https://github.com/libsdl-org/SDL/issues/10576
2025-01-02 10:25:18 -08:00
Sam Lantinga
f2074d7af3 Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL Wiki Bot
6ca2a48595 Sync SDL3 wiki -> header
[ci skip]
2024-12-31 16:20:17 +00:00
Ryan C. Gordon
fa9c3331d5 main: Adjust how SDL_HINT_MAIN_CALLBACK_RATE works.
Now (only in the generic backend, where it is implemented), this hint is
always respected. Previously it would only be used if no windows were created,
to help reduce CPU load on things like loopwave.

Since it's always used now, the default has changed from 60 (Hz) to 0 (run as
fast as possible). Things like loopwave should still likely force this way
lower than the previous default (and already do: loopwave explicitly sets it
to 5).

The hint can now also be set to "waitevent" which will cause SDL_AppIterate
to only be called after new events have arrived, for apps that are entirely
driven by input and want to consume (almost) no power or CPU time until then.

Fixes #11093.
Fixes #11387.
2024-12-31 08:19:38 -08:00
SDL Wiki Bot
1701208f32 Sync SDL3 wiki -> header
[ci skip]
2024-12-27 17:25:19 +00:00
Semphris
0461180e25 SDL_EVENT_QUIT when no window nor tray
SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE will not fire if there are active tray icons. This impacts only applications that create tray icons, and that at least one icon outlives the last visible top-level window. SDL_EVENT_QUIT will fire when the last active tray is destroyed if there are no active windows.
2024-12-27 09:22:27 -08:00
Ryan C. Gordon
f0fad41f2c
include: Filled in all remaining missing documentation! 2024-12-22 01:58:13 -05:00
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
expikr
345cab1e36
streamline cursor clipping logic on windows (#11237)
This commit does the following:
- add logic in the `WM_MOUSEMOVE` case of the Window to conditionally call `WIN_UpdateClipCursor` upon receiving cursor motion if SDL is expecting the mouse to be clipped in some way (Fixes #7890)
- remove Windows-specific periodic refresh of cursor clipping and its `SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL` hint (superceded by the above bullet point)
- streamline the processing logic within `WIN_UpdateClipCursor` for better readability of each branch, and avoid calling the Platform API until it is absolutely necessary.
- move `relative_mouse_center` field from Windows-specific per-window `SDL_WindowData` to the global `SDL_Mouse` struct, and the corresponding hint callbacks to `SDL_mouse.c` instead of `SDL_windowswindow.c`
2024-12-18 17:25:06 -08:00
SDL Wiki Bot
a92eade183 Sync SDL3 wiki -> header
[ci skip]
2024-12-16 17:20:27 +00:00
Ryan C. Gordon
35360ec4d7 alsa: Use more hints for opening default devices. 2024-12-16 12:19:48 -05:00
Ryan C. Gordon
a55686ce61
hints: Clarify when joystick hints should be set.
Fixes #9490.
2024-12-15 21:28:28 -05:00
Nicolas Allemand
b7a31ead08 added "gpu" to the list of possible values of SDL_HINT_RENDER_DRIVER in SDL_hints.h 2024-12-03 09:06:40 -08:00
SDL Wiki Bot
03d15c031b Sync SDL3 wiki -> header
[ci skip]
2024-11-25 22:44:00 +00:00
expikr
d55e6dfc5e hint for which system cursor to use as default
Co-Authored-By: Sam Lantinga <slouken@libsdl.org>
2024-11-25 13:08:37 -08:00
Maia
97ddc9adf2 Fix outdated references to SDL symbols in docs. Fixes #11503 2024-11-22 15:52:31 -05:00
SDL Wiki Bot
d2dc0fa920 Sync SDL3 wiki -> header
[ci skip]
2024-11-19 02:19:43 +00:00
Sam Lantinga
d8f8cf3e99 Added SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED 2024-11-18 14:50:37 -08:00
SDL Wiki Bot
b0140fb1b4 Sync SDL3 wiki -> header
[ci skip]
2024-11-08 00:35:43 +00:00
Sam Lantinga
97dac37373 Added SDL_HINT_ANDROID_LOW_LATENCY_AUDIO 2024-11-07 16:34:34 -08:00
SDL Wiki Bot
68cc173d92 Sync SDL3 wiki -> header
[ci skip]
2024-10-30 20:47:55 +00:00
expikr
7c968f1510 Update SDL_hints.h 2024-10-30 12:01:51 -07:00
expikr
e2857fc5a2 Update SDL_mouse.c 2024-10-30 12:01:51 -07:00
Petar Popovic
5e855d82e3 Manually bump versions of non-function identifiers introduced after 3.1.3 to 3.2.0 2024-10-23 11:17:46 -07:00
Ryan C. Gordon
1c1706a00b
fnsince: update \since policy for documentation.
Everything in SDL3 up to the ABI lock is reported as available since 3.1.3.
Everything else will be reported as since 3.2.0 (what will be the first
official release).

Also ran a Perl script over the headers to change everything to 3.1.3 that
wasn't an API function, since fnsince.pl can't manage those. If there's a
macro or datatype that has snuck in that needs to be 3.2.0 instead, we'll
have to manually fix it up, but it shouldn't be a big deal in any case.

Reference PR #11304.
2024-10-23 12:22:43 -04:00
Petar Popovic
af1c165352 Set version of new identifiers after 3.1.3 release to 3.1.6 2024-10-22 22:40:07 -07:00
Maia
a48fa675be Fix formatting 2024-10-18 13:45:04 -07:00
Frank Praznik
a7da3ad59b x11: Support sorting displays via the priority hint
Store the connector name for displays and use it for sorting them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
Frank Praznik
0faf9dc4a4 kmsdrm: Support sorting displays via the priority hint
Use the connector name for displays and sort them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
SDL Wiki Bot
2654d5d48b Sync SDL3 wiki -> header
[ci skip]
2024-10-18 02:34:29 +00:00
Sam Lantinga
e81e917c5e Added an OpenVR video driver (thanks @cnlohr!) 2024-10-17 19:38:04 -07:00
SDL Wiki Bot
dede2ab86f Sync SDL3 wiki -> header
[ci skip]
2024-10-15 17:53:13 +00: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
Petar Popovic
3086b25c4e Set hint SDL_HINT_MAC_SCROLL_MOMENTUM version to SDL 3.1.4. 2024-10-11 17:33:52 -07:00
Petar Popovic
6d85127560 Rename hint string literal SDL_HINT_MAC_SCROLL_MOMENTUM 2024-10-10 16:16:36 -07:00
Daniel Ludwig
5b6342a00d Default SDL_HINT_JOYSTICK_GAMEINPUT to "1" on GDK platforms 2024-10-09 07:30:13 -07:00
Jan Sedivy
bf54eddba9 macOS: Clarify when macOS hints need to be set 2024-10-06 12:36:42 -07:00
Jan Sedivy
c2b98e21ba macOS: Add hint for smooth SDL_EVENT_MOUSE_WHEEL values 2024-10-06 12:36:42 -07:00
Sam Lantinga
b8e72b0969 Note that creating a renderer will fail if the preferred renderer isn't available.
Fixes https://github.com/libsdl-org/SDL/issues/11077
2024-10-05 09:55:26 -07:00
Ryan C. Gordon
c25423b94c
docs: Filled in some category pages. 2024-10-04 16:22:00 -04:00
SDL Wiki Bot
d529407ce7 Sync SDL3 wiki -> header 2024-10-04 15:58:03 +00: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
SDL Wiki Bot
1f727b61f3 Sync SDL3 wiki -> header 2024-09-18 21:04:36 +00:00
Sam Lantinga
398dff7c25 Added support for the HORI licensed Steam Controller 2024-09-18 14:08:32 -07:00