Commit Graph

15885 Commits

Author SHA1 Message Date
Sam Lantinga
db43a6b418 testcamera: open the camera using the highest framerate available 2024-05-02 12:27:20 -07:00
Sam Lantinga
d4dc613559 Allow specifying only some SDL_CameraSpec fields when opening a camera
This allows setting the size without format, or FPS without size, etc.
2024-05-02 12:25:39 -07:00
Sam Lantinga
861815e51d Fixed camera FPS matching 2024-05-02 12:12:20 -07:00
Sam Lantinga
53bec8b7b7 Fixed updating NV12 textures when using the D3D11 render driver 2024-05-02 11:40:28 -07:00
Sam Lantinga
e6e1412e20 testcamera: create the texture as a streaming texture, since we'll update it every frame.
Also set the window size to the camera texture size
2024-05-02 11:40:28 -07:00
Sam Lantinga
eb26f439d8 Fixed crash when the graphics driver is upgraded while the renderer is running 2024-05-02 11:40:28 -07:00
Anonymous Maarten
a8526f5a19 cmake: disable documentation installation by default 2024-05-02 19:54:37 +02:00
Semphris
4ac8968f65 Fix improper handling of NULL dialog filter on Cocoa 2024-05-02 10:18:31 -07:00
Ryan C. Gordon
9f842e9b5a wikiheaders: Bind #defines below a function to it, like typedefs.
This effectively adds the property symbols for various functions to the
function's wiki page.
2024-05-02 12:49:30 -04:00
Semphris
0178b19489 Add '/' to GetUserFolder(HOME) on Cocoa & Unix 2024-05-02 08:51:58 -07:00
Ryan C. Gordon
eb2c9e9235 wikiheaders: added --report-coverage-gaps to see what we aren't covering! 2024-05-01 19:58:21 -04:00
Frank Praznik
05c5b3398f wayland: Clean up xdg_dialog objects with toplevel windows 2024-05-01 15:18:23 -04:00
Sam Lantinga
d95f5bad24 Updated to version 3.1.2 for the preview release 2024-05-01 09:34:25 -07:00
Sam Lantinga
e52a2474f1 Fixed updating CMakeLists.txt with update-version.sh 2024-05-01 09:33:30 -07:00
Ryan C. Gordon
12b6c17575 wikiheaders: Generate wiki pages for defines under a typedef.
These are just there to handle cases where a user stumbles upon a symbol
and punches it into the wiki, so they don't get a 404 for it, but rather
a pointer to where that symbol is relevant.

These pages are generated in the wiki if they don't exist, and are never
overwritten, in case text has been added to them. They are also not bridged
back to the headers or added to the set of manpages.
2024-04-30 22:47:02 -04:00
Ryan C. Gordon
a24d30e911 wikiheaders-options: Correct project full name. 2024-04-30 21:46:56 -04:00
Ryan C. Gordon
5481ea4cd4 wikiheaders: manpages See Also sections should specify 3 vs 3type. 2024-04-30 21:46:56 -04:00
Ryan C. Gordon
9210c68c44 wikiheaders: Manpages go in man3 directory, even if they're 3type. 2024-04-30 21:46:56 -04:00
Petar Popovic
dec872bdd9 Fix SDL_GetDaysInMonth() num days in january 2024-04-30 18:06:41 -07:00
Semphris
b9d3d746a0 Add trailing path separator to SDL_GetUserFolder() 2024-04-30 18:01:16 -07:00
SDL Wiki Bot
97d0e78842 Sync SDL3 wiki -> header 2024-04-30 17:48:27 +00:00
Semphris
c6a70d6898 Add support for modal windows to more platforms
- Adds support for modal windows to Win32, Mac, and Haiku, and enhances functionality on Wayland and X11, which previous set only the parent window, but not the modal state.
- Windows can be declared modal at creation time, and the modal state can be toggled at any time via SDL_SetWindowModalFor() (tested with UE5 through sdl2-compat).
- Allows dynamic unparenting/reparenting of windows.
- Includes a modal window test.
2024-04-30 13:47:57 -04:00
Sam Lantinga
97f7b4620a Fixed building with GDK (thanks @Romans-I-XVI!)
(cherry picked from commit 1caa427035)
2024-04-30 10:22:56 -07:00
Austin Sojka
42d7225a62 Added GDK app constrained/unconstrained events (#9608)
(cherry picked from commit 7554e82ec3)
2024-04-30 10:21:59 -07:00
Semphris
2b7af6636f Fix dialogs on Windows
This fixes a bunch of issues with dialogs on Windows.

- Removed lpstrFileTitle assignation, which overwrote the buffer
- Increased the memory size available for long file selections
- Removed seemingly unused `default_folder` in win_Args struct
- Properly handle the case where only one file is selected in multiselect mode
- Properly handle the initial folder, which would fail in specific conditions

The details for the last entry are explained in a comment in the code.
2024-04-30 10:17:46 -07:00
Ravbug
2f8cfce154 Fix SDL_main on UWP with C++20
/ZW is incompatible with C++20, so disable the #error in that case. In addition, define a main function because UWP in C++20 mode links to standard main.
2024-04-30 10:16:32 -07:00
Nhalrath
8eeaa815d9 docs: rename num to size in SDL_iostream 2024-04-30 10:16:10 -07:00
Susko3
5045680628 Override onTrimMemory() instead of onLowMemory()
https://developer.android.com/reference/android/content/ComponentCallbacks#onLowMemory()

> Preferably, you should implement ComponentCallbacks2#onTrimMemory from ComponentCallbacks2 [...].
> That API is available for API level 14 and higher, so you should only use this onLowMemory() method as a fallback for older versions.

Since the SDL3 min api level is 19, there's no need for `onLowMemory()` compat.
2024-04-30 08:54:19 -07:00
SDL Wiki Bot
556d9b8497 Sync SDL3 wiki -> header 2024-04-30 10:45:12 +00:00
SDL Wiki Bot
8b06473a11 Sync SDL3 wiki -> header 2024-04-29 20:53:27 +00:00
Petar Popovic
7bfecacc02 Removing function macro SDL_TABLESIZE() 2024-04-29 13:52:48 -07:00
Petar Popovic
8d0ad44edd Adding tag names to enums
Adding tag names to following enums:
SDL_JoystickType, SDL_JoystickConnectionState, SDL_TouchDeviceType, SDL_DUMMY_ENUM
2024-04-28 16:09:37 -07:00
Petar Popovic
dffbb574ea renaming SDL_eventaction tag to SDL_EventAction 2024-04-28 16:09:09 -07:00
SDL Wiki Bot
3f2f712fff Sync SDL3 wiki -> header 2024-04-28 12:29:13 +00:00
Sam Lantinga
0df12d223c Fixed crash cleaning up text
Text needs to be cleaned up before the renderer is freed.
2024-04-26 19:32:20 -07:00
Tyson Whitehead
0ab5a8a413 Initialize udev before joystick manual scan so class lookup works
LINUX_JoystickInit does a manual scan first so devices are sorted.
If SDL_UDEV_Init hasn't run by then, then the product info cannot
be looked up by SDL_UDEV_GetProductInfo and the initial-plugged-
in-device classification falls back to heuristic guessing.

(cherry picked from commit 0963c11af8)
2024-04-26 12:16:24 -07:00
SDL Wiki Bot
d42d661498 Sync SDL3 wiki -> header 2024-04-26 18:04:12 +00:00
Anonymous Maarten
817c45fc64 ci: build SDL on macos 13 (x86_64) 2024-04-26 17:09:31 +00:00
Petar Popovic
410a3c2c37 .gitignore: Adding compile_commands.json and .cache/ 2024-04-26 08:48:22 -07:00
Sam Lantinga
14f584a94b SDL_CreateWindowAndRenderer() takes the window title as the first parameter
Fixes https://github.com/libsdl-org/SDL/issues/9626
2024-04-25 20:00:14 -07:00
Sam Lantinga
2d7cc6ded0 Fixed getting the renderer info when creating a window texture 2024-04-25 17:32:56 -07:00
Sam Lantinga
ca61bf682a Make sure output parameters are zeroed in the case of an error 2024-04-25 16:46:44 -07:00
Sam Lantinga
04f1901751 Fixed window flashing under X11 when creating a window and OpenGL renderer 2024-04-25 16:42:43 -07:00
Ethan Lee
26b71d14e9 storage: Static analysis fix 2024-04-25 19:40:07 -04:00
SDL Wiki Bot
57f96fb124 Sync SDL3 wiki -> header 2024-04-25 21:23:14 +00:00
SDL Wiki Bot
1b8d4d77d6 Sync SDL3 wiki -> header 2024-04-25 21:01:12 +00:00
Ryan C. Gordon
2ee1c87eb0 wikiheaders: Fixed preprocessor line check to include #endif.
Reference Issue #9557.
2024-04-25 16:46:43 -04:00
Ryan C. Gordon
6b1a98e664 wikiheaders: Allow basic typedefs to pull in some preprocessor logic.
Reference Issue #9557.

This lets SDL_AudioFormat have the `#if byteorder == lilendian` section.
2024-04-25 16:44:09 -04:00
SDL Wiki Bot
a13bdeee8a Sync SDL3 wiki -> header 2024-04-25 20:40:14 +00:00
Petar Popovic
e0b45fed06 testlock.c: replace function call kill with raise
Replacing function call `kill(0, SIGINT);` with `(void)raise(SIGINT);` in file test/testlock.c.
The `kill()` function is not available on Unix systems when compiling without system extensions enabled.
2024-04-25 15:11:08 -04:00