Commit Graph

16902 Commits

Author SHA1 Message Date
Sam Lantinga
421326b6da Fixed controllers not being seen as gamepads after adding a mapping 2024-06-19 08:32:18 -07:00
Hubert Maier
90b7097a90 JANITORIAL: Fix ammount typos (#10060) 2024-06-19 07:27:19 -07:00
SDL Wiki Bot
ab98d51b9f Sync SDL3 wiki -> header 2024-06-19 14:15:46 +00:00
Hubert Maier
81d8fcb5d8 JANITORIAL: Fix judgement typos (#10059) 2024-06-19 07:14:58 -07:00
Hubert Maier
3acdb8a90b JANITORIAL: Fix typos in comments in various files (#10058) 2024-06-19 07:13:46 -07:00
Aikawa Yataro
0fe9f5da54 Update qsort implementation 2024-06-19 05:40:01 +03:00
Zack Middleton
02597cdc56 Remove cursors not in SDL2 from migration guide 2024-06-18 12:22:02 -04:00
Zack Middleton
5ecf125456 Update descriptions for window resize cursors
The SIZENWSE, SIZENS, etc cursors were renamed.
2024-06-18 12:22:02 -04:00
Sam Lantinga
d7391394d3 Switched the camera format to use framerate ratio instead of interval ratio
This is more intuitive for game developers and users.

Fixes https://github.com/libsdl-org/SDL/issues/9896
2024-06-18 07:39:52 -07:00
Sam Lantinga
ea8df46575 We don't support directly rendering to PQ swap chains
Normally this would be done by creating a PQ swap chain and a linear SRGB render target and doing blending operations in linear space and then final conversion to PQ HDR, but we're going to short-circuit all of that and just support linear SRGB output directly.
2024-06-17 17:29:33 -07:00
Anonymous Maarten
122c3e6a81 ci: create simpler Gradle testspriteminimal project instead 2024-06-18 00:38:35 +02:00
Anonymous Maarten
1a68d846de Create a functional CMake project using androidbuild.sh 2024-06-18 00:11:44 +02:00
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
c4b471bd13.

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