Commit Graph

20298 Commits

Author SHA1 Message Date
Ryan C. Gordon
17d77f5fbd examples: Added misc/02-clipboard 2025-09-24 14:41:29 -04:00
eafton
0b9a197eda X11TK: Remove text positioning hacks, use proper ascent values. (#14040) 2025-09-24 11:26:12 -07:00
Frank Praznik
9d5d7010de wayland: Ignore bogus libdecor content sizes if an unmapped window is suspended
If a client takes a long time to present the first frame after creating the window, a configure event to set the suspended state may arrive with libdecor increasing the content size by the decoration dimensions, which should be ignored.
2025-09-24 10:34:42 -04:00
Frank Praznik
45480f5fe5 x11: Use the pending size for the min/max limits if a resize is in flight
Otherwise, an outdated size may be used, reverting the requested resize operation.
2025-09-24 10:34:42 -04:00
Sam Lantinga
0a50058f7a Use the real window position on macOS
On newer MacBooks, the fullscreen window might be placed below the camera notch, so use the actual window position

Fixes https://github.com/libsdl-org/SDL/issues/10441
2025-09-23 22:57:21 -07:00
Sam Lantinga
fe8c080713 testime: allow enabling/disabling text input on individual windows 2025-09-23 09:59:11 -07:00
Simon McVittie
c13e74be6b progress: Correct calls to dbus_message_iter_open_container with variants
As documented, the contained_signature is to be passed in as a
nul-terminated C string.

For basic types that are represented by a single character, on
little-endian platforms, putting the type in the least significant
byte of an int and casting its address to `char *` happens to result in
a valid string, because the int's in-memory representation looks like
`(char []){ 'b', 0, 0, 0 }`. However, on big-endian platforms, the int's
in-memory representation is `(char []){ 0, 0, 0, 'b' }` which is not
a valid type for a D-Bus variant to hold (it is interpreted as an empty
string, and variants are not allowed to be empty).

Instead, do this the straightforward way, with a mnemonic string and
no casts (in the same style used in `SDL_portaldialog`).

Fixes: 3f2226a9 "Add progress bar support for Linux"
Resolves: https://github.com/libsdl-org/SDL/issues/13953
Bug-Debian: https://bugs.debian.org/1115705
Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-09-23 08:19:25 -07:00
Sam Lantinga
221d1f12ea Use an empty bitmap for the blank cursor on macOS
Some macOS installations seem to have trouble decoding the GIF we were using

Fixes https://github.com/libsdl-org/SDL/issues/14012
2025-09-22 19:14:38 -07:00
Anthony
1d348a3718 Update proguard-rules.pro
getContext() now returns Activity.
2025-09-22 16:46:35 -07:00
Frank Praznik
18195c5ef0 x11: Add #ifdef guards to the XInput2 quit function
Fixes building if XInput2 isn't available.
2025-09-22 17:48:12 -04:00
Frank Praznik
733335e272 x11: Apply remapping to XInput2 mouse button events from slave devices
Slave pointer devices report raw button values, while the master pointer device reports button values with remapping applied. Manually apply the remapping table to slave device buttons to eliminate multiple button events from one press, and allow button remapping to function when relative mode is active.
2025-09-22 17:33:31 -04:00
eafton
4363582e6d X11TK: Fix build 2025-09-22 14:31:13 -07:00
eafton
7cc477d458 X11TK: Even more failsafes for fonts 2025-09-22 14:31:13 -07:00
eafton
773db8eb75 X11TK: Even more failsafes for fonts 2025-09-22 14:31:13 -07:00
eafton
8cbd5d5b25 X11TK: Use SDL_roundf instead of normal roundf 2025-09-22 14:31:13 -07:00
eafton
667eac3354 X11TK: Formatting 2025-09-22 14:31:13 -07:00
eafton
fb99dfc076 X11TK: Cleanups, reduce scaling factor if a font cant be found 2025-09-22 14:31:13 -07:00
Dan Andrus
6d0fdb627e Update references to macOS 10.16 to macOS 11.0
Fixes api availability compiler warnings when building the joystick subsystem for macOS versions older than 11.0. The compiler expects the version number passed into @available and API_AVAILABLE macros to be greater than or equal to 11.0, which 10.16 is not. (Even though 10.16 and 11.0 are semantically equivalent, the compiler doesn't know this.)
2025-09-22 11:32:32 -07:00
Nintorch
ea8d8d725a Add support for USB vendor/product IDs to Emscripten joysticks (#14003) 2025-09-22 11:30:53 -07:00
Sam Lantinga
6f3ef22d19 Fixed build warning 2025-09-22 11:27:23 -07:00
Sam Lantinga
cece47c64d Fixed iOS build 2025-09-22 11:27:07 -07:00
Sam Lantinga
137b0b2bee The default swap interval on EGL is 1, according to the spec
Fixes https://github.com/libsdl-org/SDL/issues/14014
2025-09-22 10:23:08 -07:00
Sam Lantinga
8a67a8a319 testautomation: fixed video tests on iOS 2025-09-22 10:09:30 -07:00
Sam Lantinga
5d9b9673b9 testautomation: use SDL functions for iostream test setup
This fixes the IOStream tests on iOS, since the current directory isn't writable
2025-09-22 10:09:30 -07:00
Sam Lantinga
9f9952d53a Fixed filesystem operations on iOS
Full paths are used as-is, relative paths are prepended with a writable path, SDL_GetPrefPath("", ""), since the current directory isn't writable.
2025-09-22 10:09:30 -07:00
Sam Lantinga
7563a3e17d Fixed clipboard tests on iOS 2025-09-22 10:09:30 -07:00
Sam Lantinga
a662d13f73 Fixed building testautomation on iOS 2025-09-22 10:09:30 -07:00
Ryan C. Gordon
f5d7004cbb main: Fixed crashes if specifying hints to Emscripten as URL options. 2025-09-22 11:57:42 -04:00
SDL Wiki Bot
d8124a0cea Sync SDL3 wiki -> header
[ci skip]
2025-09-22 15:34:13 +00:00
Sam Lantinga
86203d8312 Document that the joystick and gamepad functions are thread-safe 2025-09-22 08:32:39 -07:00
Brenton Bostick
8abbb98222 Android: fix 'JVM object referenced by 'context' is of type 'Context' and it d… (#14016)
fix 'JVM object referenced by 'context' is of type 'Context' and it does not have access to method 'registerReceiver(BroadcastReceiver, IntentFilter)' declared in class 'ContextWrapper'.'
2025-09-22 08:15:48 -07:00
Adrian
d86e0db683 always link to GameController on iOS and related Apple platforms 2025-09-22 08:13:21 -07:00
Ryan C. Gordon
09ee8876b3 wav: Patched to compile on Visual Studio. 2025-09-22 10:37:52 -04:00
Ryan C. Gordon
c8eb9f3706 x11: Set EGL surface for foreign X11 windows.
Cherry-picked by hand from SDL2: 780ec8fac0

Also cleaned up the XDestroyIC cleanup code to match the setup code.

Fixes #11996.
2025-09-22 10:37:52 -04:00
Brenton Bostick
8d86ee4995 fix various places where nativeSetupJNI being treated as returning int 2025-09-22 07:25:57 -07:00
Brenton Bostick
6590a5bc0b fix: Extra parameter(s) for call to 'getCacheDir()'. 2025-09-22 07:25:00 -07:00
Brenton Bostick
7622c4c427 fix typos 2025-09-22 07:23:49 -07:00
Brenton Bostick
ed7d39b28c fix 'SDL_MessageBoxFlags' is not a valid JVM type. 2025-09-22 07:03:49 -07:00
Ryan C. Gordon
44e4deab7c wav: Clamp DATA chunk to size of file if possible.
Prevents a malicious file from malloc'ing multiple gigabytes.

Fixes #10052.
2025-09-22 09:50:56 -04:00
g9wp
aef05d8750 tray(Win32): re-add the tray icon upon taskbar restart (#13261) 2025-09-22 06:47:25 -07:00
zuiki_inn
fc648e5546 Support ZUIKI MasconPro (#13770)
* Add ZUIKI controller

Support version:
MasconPro

Enable rumble
Disable sensors
2025-09-21 23:38:28 -07:00
Sam Lantinga
34b09be6a5 Use clearPrimaryClip() on Android 9 and newer
Fixes https://github.com/libsdl-org/SDL/issues/8355
2025-09-21 23:30:20 -07:00
Sam Lantinga
c8f32b67ae testautomation: use the correct return type for clipboard APIs 2025-09-21 23:27:59 -07:00
Sam Lantinga
a5b070ba2d Skip render_testLogicalSize() if we didn't get a window of the expected size
We rely on that to validate the results of SDL_GetRenderLogicalPresentationRect()
2025-09-21 20:25:10 -07:00
Sam Lantinga
26dd4e3abb Fixed filesystem operations on Android
Full paths are used as-is, relative paths are prepended with SDL_GetAndroidInternalStoragePath(), and operations fall back to the asset system as appropriate.

This is consistent with the behavior of opening files on Android.
2025-09-21 18:23:34 -07:00
Sam Lantinga
005f10bd97 testautomation: fix video tests on Android
Like emscripten, window positioning and sizing is not supported on Android.
2025-09-21 16:25:51 -07:00
Adrian
670e4d2ae6 Use -Wno-deprecated-declarations on apple platforms 2025-09-21 15:17:33 -07:00
Sam Lantinga
bae34c3e34 Fixed SDL_RunOnMainThread() on Android
If the application is waiting in SDL_WaitEvent(), we still need to run event loop maintenance in between calls to Android_PumpEvents().

Fixes the testautomation events_mainThreadCallbacks() test on Android.
2025-09-21 13:46:11 -07:00
Fierelier
3fd0b46215 [SDL3] [PS2] Framebuffer resolution + 240p/480p + PAL support (#13993)
* Do not override NTSC/PAL

* Fix PS2 build instructions

* Add PS2 GS hints
Allows for switching between NTSC/PAL, progressive/interlaced, etc
2025-09-21 07:50:14 -07:00
Sam Lantinga
bce2a336d2 Use the default window focus behavior on macOS
We had to work around odd behavior in really old versions of macOS, but the current behavior is great.

Fixes https://github.com/libsdl-org/SDL/issues/3954
2025-09-20 18:57:22 -07:00