Commit Graph
20269 Commits
Author SHA1 Message Date
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
Sam Lantinga 400489c157 testcontroller: fixed memory leak 2025-09-20 18:21:26 -07:00
SDL Wiki Bot 628d157676 Sync SDL3 wiki -> header
[ci skip]
2025-09-20 22:39:37 +00:00
Sam Lantinga 6a9ac1cacd Always poll udev on supported platforms
Fixes https://github.com/libsdl-org/SDL/issues/13995
2025-09-20 11:13:39 -07:00
Sam Lantinga 8eeae5f686 The wayland messagebox should only be used under wayland 2025-09-20 09:06:07 -07:00
Sam Lantinga 5503fe1c1b Fixed a memory leak in fill_device_info_usage() (thanks @digant73)
Fixes https://github.com/libsdl-org/SDL/issues/13998
2025-09-20 09:05:37 -07:00
Andrei Sabalenka bb2b39b8ea wayland: fix typo in xdg_positioner_set_anchor_rect 2025-09-20 08:53:49 -07:00
Sam Lantinga 597ef58966 Use zenity messageboxes by default on X11
This makes messageboxes consistent between X11 and Wayland.
2025-09-20 08:37:51 -07:00
Ozkan Sezer 9cefbab766 remove watcom compiler support from private sources 2025-09-20 03:47:02 +03:00
Frank Praznik ac82534375 tests: Flush events after an SDL_WaitEvent() call
SDL_WaitEvent() will pump OS events if no poll sentinel is pending, so flush events before inserting a user event to ensure that the user event will be next in the queue.
2025-09-19 12:36:59 -04:00
Frank Praznik 9b72545634 video: Clamp HDR levels before comparing for deduplication
Eliminates some redundant HDR changed events due to comparing clamped and unclamped values.
2025-09-19 12:36:59 -04:00
Anonymous Maarten 1d42df07ef ci: add macOS 26 job 2025-09-19 18:06:26 +02:00
Sam Lantinga 9e0549d8ff Use posix_spawn_file_actions_addchdir_np() on macOS
posix_spawn_file_actions_addchdir() was introduced in macOS 26, but we want to be able to run on systems all the way back to macOS 15
2025-09-19 08:00:03 -07:00
Sam Lantinga f8a1ea021b Fixed crashes when SDL_DISABLE_INVALID_PARAMS is enabled (thanks @AntTheAlchemist!) 2025-09-19 07:43:01 -07:00
SDL Wiki Bot 84309984a4 Sync SDL3 wiki -> header
[ci skip]
2025-09-19 14:26:10 +00:00
Anonymous Maarten 7501f7194b testsprite: zero initialize textures
LoadSprite destroys current textures before allocating new ones.
So make sure the previous (=first) textures are valid.
2025-09-19 15:37:21 +02:00
SDL Wiki Bot 4376e10ed4 Sync SDL3 wiki -> header
[ci skip]
2025-09-19 03:59:55 +00:00
Sam Lantinga 0eff3fe558 Fixed double-free when using window surfaces 2025-09-18 20:58:32 -07:00
Sam Lantinga c25a0b046a Make SDL_ObjectValid() inline for performance (thanks @mechakotik!) 2025-09-18 20:58:32 -07:00
Sam Lantinga 25b2d2c821 Use new parameter validation macro 2025-09-18 20:58:32 -07:00
Sam Lantinga ee1c90a358 Improved handling of function parameter validation
SDL supports the following use cases:
 * Normal operation with fast parameter checks (default):
    SDL_SetHint(SDL_HINT_INVALID_PARAM_CHECKS, "1");
 * Object parameters are checked for use-after-free issues:
    SDL_SetHint(SDL_HINT_INVALID_PARAM_CHECKS, "2");
 * Enable full validation, plus assert on invalid parameters:
    #define SDL_ASSERT_INVALID_PARAMS
 * Disable all parameter validation:
    #define SDL_DISABLE_INVALID_PARAMS
2025-09-18 20:58:32 -07:00
Sam Lantinga 49e15904ae Document that SDL_SCALEMODE_PIXELART is available in 3.4.0
Fixes https://github.com/libsdl-org/sdlwiki/issues/856
2025-09-18 20:22:15 -07:00
SDL Wiki Bot 1e2057f1fe Sync SDL3 wiki -> header
[ci skip]
2025-09-18 23:10:17 +00:00
Frank Praznik f540de87b9 wayland: Always set the last incoming clipboard seat when setting clipboard data
Otherwise, the clipboard will report having no or old data until events are pumped.

Fixes the automated clipboard tests.
2025-09-18 17:44:58 -04:00
Sylvain 143f65c1f8 Android: silence false Lint warnings (the class are instantiated only at correct API level) 2025-09-18 13:54:21 -07:00
Sylvain fb0a542b2a Android: Lint warning: LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS is API Level 30 2025-09-18 13:54:21 -07:00
Sylvain d631cf8409 Android: Lint warning: use some explicit Locale
Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
2025-09-18 13:54:21 -07:00
Sylvain 8da1021b51 Androind: Lint warning, use "apply()" instead of "commit()"
'Consider using apply() instead; commit writes its data to persistent storage immediately, whereas apply will handle it in the background'
2025-09-18 13:54:21 -07:00
Ethan Lee 4ee79e6493 filesystem: GetCurrentDirectory now falls back to GetBasePath when unsupported 2025-09-18 14:49:03 -04:00
Anonymous Maarten b1b98b10d8 cmake: also install wasm debug map (optional) 2025-09-18 17:18:25 +02:00