15940 Commits

Author SHA1 Message Date
Sam Lantinga
8ab1ffca8a Fixed requesting USB permission on Android 14 (thanks @ikhoeyZX!)
Fixes https://github.com/libsdl-org/SDL/issues/9831
2024-06-17 15:10:33 -07:00
Sam Lantinga
3a68febedf Enable HIDAPI controller support on mobile platforms 2024-06-17 15:05:12 -07:00
Sam Lantinga
4236fb2d63 Fixed build warnings with Android debug logging 2024-06-17 15:01:21 -07:00
Sam Lantinga
1cdcb57865 Fixed launching on Android after audio capture -> recording renaming 2024-06-17 14:44:54 -07:00
Sam Lantinga
361cae0874 Pass through the original name used by the Steam Virtual Gamepad
Proton uses this on Linux to determine what the XInput slot is for the gamepad. Other applications will get the real controller name and VID/PID by virtue of the code in SDL_steam_virtual_gamepad.c
2024-06-17 12:14:44 -07:00
Miku AuahDark
3373667faa Android: Use SCREEN_ORIENTATION_FULL_USER instead of SCREEN_ORIENTATION_FULL_SENSOR for resizable window.
The former will respect user orientation lock setting while the latter does not.
2024-06-17 07:44:05 -07:00
Sam Lantinga
b6e6c73541 Fixed building the metal renderer with SDL_LEAN_AND_MEAN
Fixes https://github.com/libsdl-org/SDL/issues/10038
2024-06-16 22:04:57 -07:00
Sam Lantinga
aeea819494 Added colorspace to SDL_CameraSpec 2024-06-16 17:47:16 -07:00
Yasushi SHOJI
98499d6818 .editorconfig: Remove excess apostrophe at *.cocci
Remove the excess apostrophe (') introduced by commit
c4b471bd1314933fd726ef987d96c92c68033f99.

Some editors complain about it.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2024-06-16 09:18:17 -07:00
Sam Lantinga
182a28b343 Fixed documentation typo 2024-06-16 08:01:16 -07:00
SDL Wiki Bot
4e5ed569c3 Sync SDL3 wiki -> header 2024-06-16 14:42:00 +00:00
Sam Lantinga
d1d484ddbe Added SDL_srand(), SDL_rand(), and SDL_rand_r() (thanks @JKaniarz!)
These are simple random functions that should not be used for serious random number generation.

Fixes https://github.com/libsdl-org/SDL/issues/4968
2024-06-16 07:41:00 -07:00
Sam Lantinga
9cb4bb92f6 Fixed parsing SDL_ANALYZER_NORETURN 2024-06-16 07:08:19 -07:00
Sam Lantinga
cf2d8dac30 Reordered conditional for clarity 2024-06-16 06:25:41 -07:00
SDL Wiki Bot
65f0691866 Sync SDL3 wiki -> header 2024-06-16 13:21:56 +00:00
expikr
ee559d51be
Add SDL_MOUSE_RELATIVE_CURSOR_VISIBLE (#7947) 2024-06-16 06:21:29 -07:00
Ryan C. Gordon
17af09f3a9
coreaudio: simplify memory leak fix.
I _did_ appreciate the explanation, but it doesn't have to live in the
source code; also we can just release `devuid` and then check for error with
the usual macro, since SDL is done with it either way at this point.
2024-06-15 11:42:44 -04:00
Ryan C. Gordon
7c2329cd78
wikiheaders: Fix C typedef parsing.
Before, it was treating `typedef struct x x;` as a struct typedef instead of
a datatype typedef. Worse, it was treating `typedef struct x *x` the same!

This might require us to manually clean out some incorrect CategoryAPIStruct
tags that have accumulated in various pages.
2024-06-15 11:31:17 -04:00
Sam Lantinga
51f90f308b Fixed spacing 2024-06-15 08:10:48 -07:00
obeecodes
3b5dce10c4 Addressed memory leak in SDL_coreaudio.m 2024-06-15 08:05:47 -07:00
Sam Lantinga
e388e377aa audio: Refer to audio devices to "playback" and "recording" 2024-06-15 08:00:33 -07:00
Anonymous Maarten
a64960cfc0 SDL_GLContext is not a void* pointer anymore 2024-06-15 14:44:09 +02:00
SDL Wiki Bot
63138c79af Sync SDL3 wiki -> header 2024-06-15 05:09:09 +00:00
Ryan C. Gordon
b83ab7eb12 audio: Remove const from an SDL_bool parameter in SDL_AddAudioDevice. 2024-06-15 01:08:12 -04:00
Ryan C. Gordon
38f0214e8a audio: Refer to audio devices to "playback" and "recording".
Fixes #9619.
2024-06-15 01:08:12 -04:00
Anonymous Maarten
031dc0743f Use an opaque struct typedef for SDL_GLContext
Using a struct typedef instead of a void pointer results in extra C typechecks
2024-06-15 01:43:22 +02:00
Frank Praznik
41532e84cb
wayland: Prevent a possible crash when determining the display for a minimized window
A minimized window may not be associated with any displays, so check that the output array is valid and that there is at least one associated display before dereferencing.

Fixes a crash when attempting to unset fullscreen on a minimized window.
2024-06-14 12:25:13 -04:00
Emmanuele Bassi
a98774e62c Check the Xft/DPI XSETTINGS
Similar to Xrm's "Xft.dpi" key, but stores in 1024th increments.
2024-06-14 08:54:17 -07:00
Emmanuele Bassi
e049098733 Query XSETTINGS for the content scale factor
For GTK-based systems using XSETTINGS it's much more likely to be
available, rather than the "GDK_SCALE" environment variable, which is a
debugging tool according to the GTK documentation.
2024-06-14 08:54:17 -07:00
Emmanuele Bassi
61dafb3b2f Add XSETTINGS support to x11 driver
Import the XSettingsClient implementation to handle the settings
selection.

Currently, we only care about the Gdk/WindowScalingFactor value used by
the windowing system to notify us of display-wide changes in the scaling
factor.
2024-06-14 08:54:17 -07:00
Ozkan Sezer
d6da494c1c un-revert commit 65d911a:
SDL3 isn't using `long long` casts, so there are no issues there
SDL2 needs handling it right..
2024-06-14 18:37:50 +03:00
Ozkan Sezer
e25a7e88ce revert commit 65d911a as it broke linux.. 2024-06-14 14:56:24 +03:00
Ozkan Sezer
65d911aff0 SDL_events.c: override of SDL_PRIs64 for mingw is no longer needed 2024-06-14 14:50:50 +03:00
Ryan C. Gordon
51902d4ac5
Updated headers with latest wikiheaders tweaks. 2024-06-14 02:09:55 -04:00
Ryan C. Gordon
c0c0c64a1d
wikiheaders: Some quick scripting to make params/return info consistent.
- Lowercase the first letter of \param and \returns data; in the former case,
  it looks better in the table and Doxyggen (imho), in the latter it's because
  it's inserted after the word "Returns" to make an english sentence on the
  wiki. This is disabled in this commit, but it was useful to turn it on to
  fix up the headers manually.

- Make sure everything ends with punctuation. Inserts a period if there's
  no existing period or exclamation point at the end of the text. This is
  enabled going forward, so we won't have to manage it ourselves.
2024-06-14 02:08:50 -04:00
Ryan C. Gordon
5bc654aad3
camera: SDL_GetCameraDeviceName() now follows the SDL_GetStringRule. 2024-06-13 18:13:51 -04:00
Ryan C. Gordon
2ad7c70ac6
documentation: clean up a minor syntax issue. 2024-06-13 18:10:28 -04:00
Ryan C. Gordon
466886049c
SDL_main.h: fix up SDL_main_func documentation to match SDL_main. 2024-06-13 18:08:40 -04:00
SDL Wiki Bot
2253c3cacf Sync SDL3 wiki -> header 2024-06-13 21:49:55 +00:00
Sam Lantinga
0635112119 Added SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE (thanks @lostgoat!) 2024-06-13 14:54:36 -07:00
SDL Wiki Bot
d46b8bc54e Sync SDL3 wiki -> header 2024-06-13 21:31:58 +00:00
Ryan C. Gordon
9d3d893322
testcamera: Report device name and SDL camera driver in the window title. 2024-06-13 17:05:47 -04:00
SDL Wiki Bot
fa3e22c5da Sync SDL3 wiki -> header 2024-06-13 21:04:27 +00:00
Ryan C. Gordon
12119cbaad
include: Several documentation tweaks; cleaned up new wikiheaders warnings. 2024-06-13 17:03:31 -04:00
Ryan C. Gordon
a9d0eaf34a
wikiheaders: Warn if a function returns non-void but has no \returns line. 2024-06-13 16:45:59 -04:00
SDL Wiki Bot
49f2a3463f Sync SDL3 wiki -> header 2024-06-13 19:34:29 +00:00
Sam Lantinga
6821fb2fe4 Fixed the right trigger on the Nintendo SNES Controller in simple report mode 2024-06-13 11:35:29 -07:00
Sam Lantinga
a3cc900157 Fixed Nintendo Switch triggers when in simple report mode 2024-06-13 11:25:27 -07:00
Frank Praznik
4eb08a6154 x11: Ungrab before attempting a confinement grab with XInput2 enabled
If XInput2 is enabled, it will grab the pointer on button presses, which results in XGrabPointer returning AlreadyGrabbed. Clear any existing grabs before attempting the confinement grab to avoid a timeout scenario.
2024-06-13 13:04:44 -04:00
Mykola Rubets
4919359a6f Fix compilation with enabled render commands logging 2024-06-13 09:51:00 -07:00