Commit Graph

18295 Commits

Author SHA1 Message Date
Sam Lantinga
b902b0527b Renamed n_mime_types to num_mime_types 2024-12-31 19:27:11 -08:00
Sam Lantinga
a767952617 Fixed spacing 2024-12-31 19:27:11 -08:00
Sam Lantinga
54c555e394 Send supported mime types for external clipboard contents on Windows 2024-12-31 19:27:11 -08:00
Sam Lantinga
8b155708ff Fixed clipboard memory leak on shutdown 2024-12-31 19:27:11 -08:00
Frank Praznik
1d417ab27f win32: Set the WS_THICKFRAME style on popup windows
Without it, programmatically resizing the window seems to fail. As popup windows are implicitly borderless, calculations taking the frame size into account need to be avoided.
2024-12-31 18:29:59 -05:00
Frank Praznik
643281d022 Revert "win32: Use the size in the WINDOWPOS data while handling popup windows in the WM_WINDOWPOSCHANGED message"
This reverts commit 4f0a056b95.
2024-12-31 18:29:59 -05:00
Willem Dinkelspiel
2be89f0dd1 Clarify migration for GetWindowData and SetWindowData 2024-12-31 15:00:39 -08:00
SDL Wiki Bot
a37f993a07 Sync SDL3 wiki -> header
[ci skip]
2024-12-31 22:56:38 +00:00
Ethan Lee
65e0fed5b3 gpu: Document why VertexID/InstanceID builtins are unreliable 2024-12-31 17:56:02 -05:00
Frank Praznik
dd83908109 keyboard: Check for both caps lock and shift when looking up a keycode by name 2024-12-31 15:17:32 -05:00
SDL Wiki Bot
99ad53ec3f Sync SDL3 wiki -> header
[ci skip]
2024-12-31 19:44:29 +00:00
Frank Praznik
df97ccf283 win32: Return 0 from WM_WINDOWPOSCHANGING if a resize is expected
This was accidentally removed while deleting some associated dead code.
2024-12-31 14:02:44 -05:00
Frank Praznik
4f0a056b95 win32: Use the size in the WINDOWPOS data while handling popup windows in the WM_WINDOWPOSCHANGED message
GetClientRect() returns old, incorrect size data for popup windows when called while processing the WM_WINDOWPOSCHANGED message, so use the WINDOWPOS data instead.

Popups can't be maximized or fullscreen, so no need to worry about a move event resizing them.
2024-12-31 13:33:11 -05:00
SDL Wiki Bot
18fc13c20d Sync SDL3 wiki -> header
[ci skip]
2024-12-31 18:00:37 +00:00
SDL Wiki Bot
6d20b65a9e Sync SDL3 wiki -> header
[ci skip]
2024-12-31 17:58:37 +00:00
Ethan Lee
3cd3c9317e storage: Add error messages when ReadIO/WriteIO lengths mismatch 2024-12-31 12:34:12 -05: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
Ethan Lee
cd1bd0ac2e storage: Remove an outdated FIXME.
Woops ended up doing GPU stuff instead, maybe after 3.2!
2024-12-31 10:46:42 -05:00
Végh Márton
0be5b8070d Update SDL_asyncio.c 2024-12-30 23:29:21 -08:00
Sam Lantinga
1c04ebe423 Renamed SDL_ASYNCIO_CANCELLED to SDL_ASYNCIO_CANCELED 2024-12-30 19:13:02 -08:00
Sam Lantinga
d4d5faedab Added SDL_EVENT_FINGER_CANCELED
Fixes https://github.com/libsdl-org/SDL/issues/10528
2024-12-30 19:13:02 -08:00
Sam Lantinga
8704ab8422 Wait for a display resize event before sending orientation changes
Fixes https://github.com/libsdl-org/SDL/issues/9585
2024-12-30 15:49:10 -08:00
Sam Lantinga
60deaf5f0f Send display mode change events when the orientation changes 2024-12-30 15:24:38 -08:00
Sam Lantinga
5340f2e3fe Updated to the latest version of gradle, with support for Android SDK 35 2024-12-30 13:13:52 -08:00
Sam Lantinga
e91c37f4dd Added support for inset handling on Android 15 2024-12-30 12:23:00 -08:00
Petar Popovic
f3cbd04a81 Fix C99 trailing enum comma warning. 2024-12-30 17:21:02 +03:00
Petar Popovic
5f25691c85 Fix C23 empty initializer warning. 2024-12-29 18:17:24 -08:00
Frank Praznik
8cc4735d74 wayland: Don't override the min/max values when scaling to the screen
The point/pixel conversion functions should return zero when passed zero, or the min/max calculations can break.
2024-12-29 18:01:13 -05:00
Semphris
2d91f096ca Remove libc function from Windows tray 2024-12-30 01:20:12 +03:00
SDL Wiki Bot
78c1dc3e2c Sync SDL3 wiki -> header
[ci skip]
2024-12-29 20:32:50 +00:00
Sam Lantinga
0410328b15 Fixed warning: ordered comparison of pointer with integer zero 2024-12-29 12:05:34 -08:00
Anonymous Maarten
d5f08b8f4b stdinc: use __has_include to detect <stdbool.h>
Newer emscripten SDK does an unconditional #include <stdbool.h>,
which clashes with our custom bool.h typedef
2024-12-29 20:54:12 +01:00
Anonymous Maarten
543f244965 tests: include SDL_build_config.h when HAVE_BUILD_CONFIG is defined 2024-12-29 20:08:06 +01:00
Ozkan Sezer
c2121dd9a2 testcamera: fix MSVC build failure due to C4244 warning. 2024-12-29 21:28:02 +03:00
Sam Lantinga
5c84d38822 testcamera: don't pick a frame size larger than the maximum texture size
Ran into this on a Huawei Y6 phone, where the back facing camera can generate 4160x2000 frames, but the maximum texture size was 4096x4096
2024-12-29 09:41:00 -08:00
Sam Lantinga
6e1177ac03 Include tray function prototypes 2024-12-29 08:15:30 -08:00
Ryan C. Gordon
c030e6f782 examples/pen/01-drawing-lines: Match render target size to renderer output.
Otherwise, on HiDPI displays (like a retina iPad), the lines you draw don't
match where the pen is touching.
2024-12-28 15:36:02 -05:00
Ryan C. Gordon
0ad3a18937 uikit: reworked Apple Pencil code.
This manages axes correctly across events, sorts out the math to convert from
Apple's data to what SDL expects, and a few other tweaks and corrections.
2024-12-28 15:36:02 -05:00
Ryan C. Gordon
f6143da617 uikit: Patched to compile, added to Xcode project. 2024-12-28 15:36:02 -05:00
Salman Alshamrani
774e38d073 uikit: Initial Apple Pencil support.
Reference Issue #9911.
Reference Issue #10516.
2024-12-28 15:36:02 -05:00
Frank Praznik
5acd7fe208 wayland: Prevent popup configure events from overwriting the current size with old data
Don't apply the supplied dimensions if they haven't changed from the last configuration event, or a newer size set programmatically can be overwritten by old data.

This check is already being done for toplevel windows, but was never added to the popup configure event.
2024-12-28 14:23:30 -05:00
Sam Lantinga
c714b1a38b Fixed public header inclusion in the Xcode project 2024-12-28 08:47:00 -08:00
Ramez Ragaa
cf439d5c63 Fix dib-to-bmp logic in SDL_windowsclipboard.c
This addresses the issue #11762 by reading the biCompression field to
determine the correct size of the color table, and consequently the
correct bih_size value.
2024-12-28 08:31:52 -08:00
Sam Lantinga
ec29d3fd66 Define NDEBUG in release Xcode builds 2024-12-28 08:25:09 -08:00
Sam Lantinga
92b7054870 Add SDL_tray.h to the public framework headers
Fixes https://github.com/libsdl-org/SDL/issues/11760
2024-12-28 08:15:19 -08:00
SDL Wiki Bot
1a466b5548 Sync SDL3 wiki -> header
[ci skip]
2024-12-28 16:06:09 +00:00
Ozkan Sezer
ec8a780ad4 tray, unix: fix -Wformat warnings
src/tray/unix/SDL_tray.c: In function 'get_tmp_filename':
src/tray/unix/SDL_tray.c:345: warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'
src/tray/unix/SDL_tray.c: In function 'get_appindicator_id':
src/tray/unix/SDL_tray.c:361: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
2024-12-28 18:37:56 +03:00
Anonymous Maarten
cc723c9e4b ci: run emscripten on Ubuntu 22.04
python3-selenium does not seem to work on Ubuntu 24.04
2024-12-28 16:20:59 +01:00
Anonymous Maarten
0cb4a94c88 cmake: really disable xrandr by default on Solaris
Fixes libsdl-org/SDL#10099
2024-12-28 11:55:59 +01:00