Commit Graph

16218 Commits

Author SHA1 Message Date
Sam Lantinga e90060d07f Renamed functions to get information from device IDs
Fixes https://github.com/libsdl-org/SDL/issues/10237
2024-07-14 09:03:59 -07:00
Anonymous Maarten 933f2fc239 pthread: timespec.tv_nsec must be less then 1000000000 ns 2024-07-14 17:28:54 +02:00
Sam Lantinga bfee544685 Changed SDL_GetWindowPixelFormat() to return SDL_PixelFormat
Fixes https://github.com/libsdl-org/SDL/issues/10257
Closes https://github.com/libsdl-org/SDL/pull/10258
2024-07-14 07:19:20 -07:00
Sam Lantinga dd08c279e2 Fixed coccinelle patching
Fixes https://github.com/libsdl-org/SDL/issues/10260
2024-07-14 07:15:48 -07:00
Sam Lantinga 509f3a42d7 Fixed crash when pumping events after the window has been destroyed on Android 2024-07-13 17:57:46 -07:00
Anonymous Maarten c80665a696 Avoid code duplication in SDL_GetPixelFormatDetails 2024-07-14 01:20:02 +02:00
pixls 4e3f35ccbf Unlocking mutex in success case too
Without unlocking, we trigger an assertion failure in SDL_sysmutex.c at line 80 (i.e. 'rc == 0'). Each lock-unlock pair should ideally cancel each other out, maintaining a reference count that returns to zero.
2024-07-13 16:12:46 -07:00
SDL Wiki Bot 2596482c3f Sync SDL3 wiki -> header 2024-07-13 21:32:39 +00:00
Sam Lantinga 650271af46 Added SDL_CreateSurfacePalette() 2024-07-13 14:31:28 -07:00
Sam Lantinga 9379e2eb8d Don't force vsync on for the software renderer
Setting vsync 0 should succeed for the software renderer.
2024-07-13 10:04:15 -07:00
Sam Lantinga 1e6119e335 VULKAN_RenderPresent() should return result code 0 on success 2024-07-13 09:27:06 -07:00
Ryan C. Gordon 3d86dce673 haiku: No more chdir to executable's directory at startup in SDL3.
Use SDL_GetBaseDir() to find this directory instead.

Reference Issue #8403.
Fixes #7596.
2024-07-13 12:24:27 -04:00
Sam Lantinga c6b9b08e9f Fixed Android build warnings 2024-07-13 09:00:41 -07:00
Sam Lantinga 44f06b216a Fixed refresh interval calculation 2024-07-13 08:52:43 -07:00
captain0xff 2dcb9440f1 android: fix the vulkan renderer 2024-07-13 08:16:26 -07:00
captain0xff 0506cf18ab android: enable vulkan renderer 2024-07-13 08:16:26 -07:00
Anonymous Maarten f13be04980 testaudio: use SDL_APP_FAILURE macro to signal failure 2024-07-13 17:06:54 +02:00
ceski 68cf17d0d4 Add a Windows mapping for SplitFish Game Controller 2024-07-12 19:48:40 -07:00
Sam Lantinga 00ab330207 Use DXGI to get precise display mode refresh rate values
Fixes https://github.com/libsdl-org/SDL/issues/10185
2024-07-12 19:45:01 -07:00
Sam Lantinga 730d5cf2f8 Added fractional representation of refresh rate to SDL_DisplayMode 2024-07-12 18:09:14 -07:00
Sam Lantinga 1162a1cb8e Added SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED and SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED 2024-07-12 18:09:14 -07:00
SDL Wiki Bot 3f446a12df Sync SDL3 wiki -> header 2024-07-12 19:42:55 +00:00
Ryan C. Gordon 8779c95905 android: Added SDL_AndroidGetCachePath().
Fixes #8408.
2024-07-12 15:41:54 -04:00
SDL Wiki Bot d949673bc9 Sync SDL3 wiki -> header 2024-07-12 18:25:57 +00:00
Sam Lantinga 4c88ddf86d More property documentation clarification 2024-07-12 11:24:40 -07:00
SDL Wiki Bot cf441332c4 Sync SDL3 wiki -> header 2024-07-12 18:21:05 +00:00
Sam Lantinga 0e56f6a3ca Clarify property group documentation
Fixes https://github.com/libsdl-org/SDL/issues/10241
2024-07-12 11:20:15 -07:00
Frank Praznik be15d4ae1f
wayland: Add support for SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH behavior
Previously, the Wayland backend did not implement support for this hint and always passed focus clicks through. Obey the hint to match the behavior of other platforms.
2024-07-12 13:58:20 -04:00
SDL Wiki Bot d6fe06bb5d Sync SDL3 wiki -> header 2024-07-12 17:42:22 +00:00
Sam Lantinga 5bf6bc4d7d Renamed SDL_Get/SetProperty() to SDL_Get/SetPointerProperty()
This is consistent with the naming for the functions that affect other data types

Fixes https://github.com/libsdl-org/SDL/issues/10241
2024-07-12 10:41:02 -07:00
Ryan C. Gordon bf03dee866
Remove `struct SDL_Camera` predeclare.
This is unnecessary and confuses the wiki bridge.
2024-07-12 13:25:06 -04:00
Anonymous Maarten 7277d69c0e cmake: verify no undefined versioned symbols exist 2024-07-12 18:45:38 +02:00
Anonymous Maarten ca36f6c43b sdlprocdump: remove dead code 2024-07-12 18:38:03 +02:00
Sam Lantinga bd041b4831 Make sure SDL subsystems are initialized before starting threads 2024-07-12 09:10:05 -07:00
SDL Wiki Bot f531003776 Sync SDL3 wiki -> header 2024-07-12 15:37:23 +00:00
SDL Wiki Bot 68dfae1322 Sync SDL3 wiki -> header 2024-07-12 15:35:05 +00:00
Sam Lantinga bafbbbf7dd Fixed V4L2 framerate request
V4L2 uses time interval instead of framerate

Fixes https://github.com/libsdl-org/SDL/issues/10234
2024-07-12 06:47:34 -07:00
Sam Lantinga 282cf286fc SDL_GetPixelFormatName() returns a string 2024-07-12 05:59:45 -07:00
SDL Wiki Bot 50589cbff6 Sync SDL3 wiki -> header 2024-07-12 12:33:26 +00:00
Ethan Lee 180b4d7e74 x11: Fix a bogus return in Vulkan_GetPresentationSupport 2024-07-11 21:50:37 -04:00
Anonymous Maarten 40f9fd854f test: use SDL_HINT_(AUDIO,VIDEO)_DRIVER macro 2024-07-11 23:37:11 +02:00
Sam Lantinga f4f4b453de Sorted API entry points 2024-07-11 12:16:35 -07:00
Sam Lantinga b517043936 Added TLS initialization and shutdown functions
Fixes https://github.com/libsdl-org/SDL/issues/8576
2024-07-11 12:11:01 -07:00
SDL Wiki Bot f0ceb92dca Sync SDL3 wiki -> header 2024-07-11 19:01:27 +00:00
Ethan Lee 8d24bb8dfc video: Added parameter checks to SDL_Vulkan_GetPresentationSupport 2024-07-11 15:00:59 -04:00
Ethan Lee 5d506a53a6 testvulkan: Add call to SDL_Vulkan_GetPresentationSupport 2024-07-11 15:00:59 -04:00
Ethan Lee 1993ef664e Add SDL_Vulkan_GetPresentationSupport 2024-07-11 15:00:59 -04:00
Frank Praznik 186fec2560 pipewire: Consolidate registry enumeration instances
The preferred Pipewire path requires both devices being available, and that a sufficiently recent underlying core version is running on the host system. These criteria were being checked separately, which required two separate instances of enumerating the Pipewire registry, which is a fairly heavy operation. Move the version info callback to the main hotplug thread to avoid enumerating the registry twice, and check for both the version and required devices at the same time on the preferred path.
2024-07-11 14:14:15 -04:00
Ozkan Sezer f437fe75f2 SDL_dynapi_overrides.h: remove left-over SDL_DestroyPixelFormat entry. 2024-07-11 18:56:40 +03:00
Sam Lantinga 875c4f0a4c Support indexed surfaces without palettes (thanks @sulix!)
Currently, all SDL_Surfaces with an indexed pixel format have an
associated SDL_Palette. This palette either consists of entirely the
colour black, or -- in the special case of 1-bit surfaces, black and
white.

When an indexed surface is blitted to another indexed surface, a 'map'
is generated from the source surface's palette to the destination
surfaces palette, in order to preserve the look of the image if the
palettes differ.

However, in most cases, applications will want to blit the raw index
values, rather than translate to make the colours as similar as
possible. For instance, the destination surface's palette may have been
modified to fade the screen out.

This change allows an indexed surface to have no associated palette. If
either the source or destination surface of a blit do not have a
palette, then the raw indices are copied (assuming both have an indexed
format).

This mimics better what happens with most other APIs (such as
DirectDraw), where most users do not set a palette on any surface but
the screen, whose palette is implicitly used for the whole application.
2024-07-11 08:31:32 -07:00