Commit Graph

19063 Commits

Author SHA1 Message Date
Timothee 'TTimo' Besset 69e03094bd fallback to defining SDL_TriggerBreakpoint as __builtin_trap in older linux arm64 environments that do not have a __has_builtin facility 2025-02-21 11:07:54 -08:00
Petar Popovic c70f54e28b Remove redundant casts 2025-02-21 10:09:10 -08:00
Sam Lantinga 2e346d7166 Added 32-bit texture formats to Texture_GetBlockWidth() and Texture_GetBlockHeight()
Fixes https://github.com/libsdl-org/SDL/issues/12335
2025-02-21 09:29:18 -08:00
Sam Lantinga 5d776c070a Refactored SDL_CreateJoystickName() into a general SDL_CreateDeviceName() 2025-02-21 09:10:54 -08:00
expikr 3293eb1a16 use hidapi to get mouse/keyboard string 2025-02-21 07:42:20 -08:00
Anonymous Maarten 7855842306 ci: disable precompiled headers for classic intel compiler 2025-02-21 04:49:33 +01:00
Anonymous Maarten 71d1de5d96 ci: add cppflags to CMAKE_(C|CXX)_FLAGS 2025-02-21 04:46:26 +01:00
Anonymous Maarten 28f0867948 SPA_FALLTHROUGH expands to nothing when using the Intel compiler 2025-02-21 04:30:19 +01:00
Anonymous Maarten 8d3db06ff2 ci: GitHub is retiring Ubuntu 20.04 support 2025-02-21 04:30:19 +01:00
Anonymous Maarten c153f83df0 ci: enable ccache 2025-02-21 04:30:19 +01:00
SDL Wiki Bot 52ee0c1058 Sync SDL3 wiki -> header
[ci skip]
2025-02-20 20:17:22 +00:00
Sam Lantinga 9267930fea Added a fast path for converting the same format and pitch 2025-02-20 12:16:26 -08:00
Sam Lantinga f24f9d3bed Revert "testcamera: added support for Motion JPEG camera frames"
This reverts commit 5ccee77190.
2025-02-20 12:16:26 -08:00
Sam Lantinga 2e89c53ebc Added support for decoding MJPG into NV12 textures 2025-02-20 12:16:26 -08:00
Sam Lantinga 06602f4e80 Document that the pitch is the length of the image data for SDL_PIXELFORMAT_MJPG 2025-02-20 12:16:26 -08:00
Sam Lantinga a792434a37 Added initial MJPG support using stb_image 2025-02-20 12:16:26 -08:00
Anonymous Maarten baf69edfc7 Revert "cmake: build SDL_uclibc with -fPIC"
This reverts commit 9784414ddd.

Some platforms (e.g. ps2) do not support pic.
2025-02-20 20:37:53 +01:00
Anonymous Maarten fdf8e5a704 ci: build static loongarch libraries with -fPIC 2025-02-20 20:28:57 +01:00
Anonymous Maarten 9784414ddd cmake: build SDL_uclibc with -fPIC 2025-02-20 20:28:54 +01:00
Frank Praznik b48de48efb wayland: Add support for high-DPI icons 2025-02-20 13:57:37 -05:00
Frank Praznik 6e0264d38e x11: Use the current or last-requested window position when setting the size hint
The move operation is just a no-op to try and force the hint to take effect, so it should use the current window coordinates.
2025-02-20 13:25:47 -05:00
Sam Lantinga 1a38960eee Call SDL_DiscardAllCommands() for the software renderer as well 2025-02-20 09:53:11 -08:00
Sam Lantinga 8f4c5e15f1 Finish any drawing when destroying a software renderer
Fixes the SDL3 version of https://github.com/libsdl-org/sdl2-compat/issues/373
2025-02-20 08:49:47 -08:00
Paper 1a853973ab thread/windows: fix stack overflow in exception naming 2025-02-20 07:57:00 -08:00
Sam Clegg a40b2de946 Fix SDL_emscriptenaudio.c under wasm64
Same as #12332 which already landed on SDL2 branch.
2025-02-19 13:00:47 -08:00
Anonymous Maarten 523e6530a8 SDL_test: fix "'function': different 'const' qualifiers" warning in SDL_test_harness 2025-02-19 19:06:48 +01:00
Frank Praznik 9e4c657ed8
wayland: Fix color manager protocol string check 2025-02-19 11:43:53 -05:00
nightmareci 7500a758b8 Remove usages of `restrict` keyword in SDL_render.c
I ran into the usage of `restrict` breaking builds targeting Windows XP, as the v141 MSVC toolset doesn't support the keyword.
2025-02-18 11:40:43 -08:00
Frank Praznik a7f01cd73c x11: Set the pending window position immediately after mapping
Waiting until the first configure event to perform the move can result in the window visibly jumping in position.
2025-02-18 11:27:03 -05:00
Mike Kosek 1fd626939f Renamed DreamPort to DreamPicoPort 2025-02-18 11:06:28 -05:00
ImThour 31f9cb4806
Unchecked Return Value in WIN_SuspendScreenSaver (#12316) 2025-02-17 15:36:56 -08:00
ImThour 057c3602e9 Removing Double-free Issue 2025-02-17 15:34:18 -08:00
ImThour 5c79f4cae1 Incorrect bfOffBits Calculation in WIN_ConvertDIBtoBMP 2025-02-17 13:59:03 -08:00
Cameron Gutman 70d23b2349 README-migration: Remove errant reference to SDL_FALSE_ 2025-02-17 15:16:35 -06:00
Petar Popovic 6aef6ae9a8 AddPulseAudioDevice(): Fix use-after-free 2025-02-17 11:12:44 -08:00
Frank Praznik 3b4cfc11f0 wayland: Update copyright dates in added color manager source files 2025-02-17 11:36:00 -05:00
Frank Praznik fadb261b66 wayland: Add color manager protocol support
Support the official wp_color_manager_v1 protocol.
2025-02-17 11:31:12 -05:00
Sam Lantinga 6ef687c864 Simplified and fixed media foundation buffer handling 2025-02-17 08:14:30 -08:00
Sam Lantinga de12cb92dc Fixed crash at shutdown with new hashtable code 2025-02-17 08:14:30 -08:00
ImThour a513168902
Fixed Memory/Resource Leaks (#12304) 2025-02-17 07:30:30 -08:00
Petar Popovic 045a4492f1 test/testaudio.c: Fix use-after-free warning 2025-02-16 19:35:54 -08:00
Petar Popovic da2460f9e7 test/testautomation_audio.c: Free variables before returning 2025-02-16 16:57:56 -08:00
captain0xff 7ea0ffb748 update 2025-02-16 13:44:00 -08:00
captain0xff 06eb10c518 haiku: check if the returned _SDL_GLView is null or not 2025-02-16 13:44:00 -08:00
SDL Wiki Bot dea99e54fd Sync SDL3 wiki -> header
[ci skip]
2025-02-16 17:44:58 +00:00
Sam Lantinga 1754943596 Fixed camera frame acquisition on Windows 7
Fixes https://github.com/libsdl-org/SDL/issues/12210
2025-02-16 08:13:35 -08:00
Sam Lantinga e3d9f1172c Remove the reference to the thread when it is detached
Fixes https://github.com/libsdl-org/SDL/issues/12301
2025-02-16 07:56:30 -08:00
Petar Popovic 831fc70923 test/testautomation_intrinsics.c: Free variables before returning 2025-02-16 07:50:07 -08:00
Petar Popovic c6a3b5b6ef src/test/SDL_test_harness.c: Free variables before returning 2025-02-15 21:00:04 -08:00
Ryan C. Gordon 84a236c92e hashtable: Redesign the hashtable API.
This was intended to make the API public, so SDL_hashtable.h got an extreme
documentation makeover, but for now this remains a private header.

This makes several significant interface changes to SDL_HashTable, and
improves code that makes use of it in various ways.

- The ability to make "stackable" tables is removed. Apparently this still
  worked with the current implementation, but I could see a future
  implementation struggle mightily to support this. It'll be better for
  something external to build on top of the table if it needs it, inserting a
  linked list of stacked items as the hash values and managing them separately.
  There was only one place in SDL using this, unnecessarily, and that has also
  been cleaned up to not need it.
- You no longer specify "buckets" when creating a table, but rather an
  estimated number of items the table is meant to hold. The bucket count was
  crucial to our classic hashtable implementation, but meant less once we
  moved to an Open Addressing implementation anyhow, since the bucket count
  isn't static (and they aren't really "buckets" anymore either). Now you
  can just report how many items you think the hash will hold and SDL will
  allocate a reasonable default for you...or 0 to not guess, and SDL will
  start small and grow as necessary, which is often the correct thing to do.
- There's no more SDL_IterateHashTableKey because there's no more "stackable"
  hash tables.
- SDL_IterateHashTable() now uses a callback, which matches other parts of SDL,
  and also lets us hold the read-lock for the entire iteration and get rid of
  the goofy iterator state variable.
- SDL_InsertIntoHashTable() now lets you specify whether to replace existing
  keys or fail if the key already exists.
- Callbacks now use SDL conventions (userdata as the first param).
- Other naming convention fixes.

I discovered we use a lot of hash tables in SDL3 internally. :) So the bulk
of this work is fixing up that code to use the new interfaces, and simplifying
things (like checking for an item to remove it if it already exists before
inserting a replacement...just do the insert atomically, it'll do all that
for you!).
2025-02-15 18:52:56 -05:00