Commit Graph

14855 Commits (3bc27d385684b7fa605d3ddaf86a997198653b9b)

Author SHA1 Message Date
Sam Lantinga 9db68f97f9 Reverted SDL_Vulkan_GetInstanceExtensions() API change
This function is commonly used with Vulkan structures that use uint32_t, so we should keep the Uint32 signature.
2024-03-05 13:39:42 -08:00
Sam Lantinga edbcef11ff Keep track of whether the Android on-screen keyboard was opened by the application
Fixes https://github.com/libsdl-org/SDL/issues/9202
2024-03-05 13:35:17 -08:00
Sam Lantinga c36f773eb4 Fixed "${folder^}Activity: bad substitution" with bash 3.2 on macOS 2024-03-05 13:35:17 -08:00
SDL Wiki Bot 0b4a195f4b Sync SDL3 wiki -> header 2024-03-05 21:32:25 +00:00
Sylvain cea717e5d3 Removed some uneeded 'unsigned': renderer.num_texture_format and SDL_Vulkan_GetInstanceExtensions() prototype 2024-03-05 13:31:28 -08:00
Sam Lantinga 1e0bac288b Use the hlsli extension for shader includes 2024-03-05 12:46:44 -08:00
Anonymous Maarten 4898505f23 cmake: add winres to the list of potential name rc compilers 2024-03-05 20:38:00 +01:00
Sam Lantinga d4f4aa745a Use C++ style comments in new code 2024-03-05 04:46:37 -08:00
Ozkan Sezer 98bec6749f hidapi, windows: sync with mainstream: change MAX_STRING_WCHARS to 126.
This merges mainstream commit
4f2e91bae8
(authored by Vladimir Gladkov) into ours. From the original commit log:

Win32 HID API doc says: For USB devices, the maximum string length is
126 wide characters (not including the terminating NULL character).

For certain USB devices, using a buffer larger or equal to 127 wchars
results in successful completion of HID API functions, but a broken
string is stored in the output buffer. This behaviour persists even if
HID API is bypassed and HID IOCTLs are passed to the HID driver directly
(IOCTL_HID_GET_MANUFACTURER_STRING, IOCTL_HID_GET_PRODUCT_STRING, etc).

So, the buffer MUST NOT exceed 126 wchars.

windows: refactor ULONGLONG hid_internal_get_info(...) ->
 hid_internal_detect_bus_type_result hid_internal_detect_bus_type(...)

hid_internal_detect_bus_type is now only responsible for detection of
the bus type; rename it accordingly. Also, mixing an internal flag and
DEV_INST into an ULONGLONG retval feels kinda hackish; use a cleaner
approach instead (add an internal flag to help distinguishing between
BLUETOOTH and BLE devices, then clear it once we are done).
2024-03-05 14:39:20 +03:00
Ozkan Sezer 26e3ca7387 hidapi: minor sync with mainstream (for sake of symmetry, only.) 2024-03-05 14:33:06 +03:00
Sam Lantinga fb87f8f15c testffmpeg: fixed mismatch between frame size and frame texture size
The AVHWFramesContext associated with the frame has the texture size, and the frame width and height are the displayed size and can be smaller than the texture size
2024-03-04 11:17:42 -08:00
Sam Lantinga 180dd0bb39 testffmpeg: don't free the instance extensions, we hold onto them in the context 2024-03-04 11:17:42 -08:00
Sam Lantinga 2d4105ba8b testffmpeg: only enable AV_PIX_FMT_VULKAN if we have a Vulkan renderer 2024-03-04 11:17:42 -08:00
Sam Lantinga 759ade8c90 vulkan: enable samplerYcbcrConversion when creating the device 2024-03-04 11:17:42 -08:00
SDL Wiki Bot ffef13e1e1 Sync SDL3 wiki -> header 2024-03-04 17:30:25 +00:00
Sam Lantinga 97f97109d1 testffmpeg: fixed Vulkan validation errors
The semaphores need to be submitted in order
2024-03-04 09:29:36 -08:00
Sam Lantinga dbec2150d0 testffmpeg: added support for Vulkan rendering 2024-03-04 09:29:36 -08:00
Sam Lantinga 48471f7dbd Added SDL_AddVulkanRenderSemaphores() for external synchronization with SDL rendering 2024-03-04 09:29:36 -08:00
Sam Lantinga 504d8c2fc0 Fixed potential memory leak if vkCreateInstance() fails 2024-03-04 09:29:36 -08:00
Frank Praznik 1e790b20c9 video: Don't overwrite all the pending flags in the OnWindowHidden handler
Other flags may have been set when programmatically hiding a window, so or in the fullscreen and maximized flags to avoid accidentally clearing any others.
2024-03-04 10:30:11 -05:00
Sam Lantinga 4189edaeb7 Uppercase the first letter of the class name to match Java conventions
Fixes https://github.com/libsdl-org/SDL/issues/8930
2024-03-03 16:57:02 -08:00
Robert Edmonds a4d7ff6751 testffmpeg: Use EGL_EXT_image_dma_buf_import_modifiers extension
If the `EGL_EXT_image_dma_buf_import_modifiers` extension is available, propagate the DRM format modifier from the AVDRMObjectDescriptor to eglCreateImage() on Linux. Some hardware will decode video into a non-linear DRM surface, and passing the DRM format modifier to eglCreateImage() is required in order to display something useful.

Fixes https://github.com/libsdl-org/SDL/issues/9075
2024-03-03 15:18:56 -08:00
Frank Praznik ae4484f4e5 video: Save pending window events when a window is hidden by the window manager
The window manager might hide/unmap the window when it is minimized, in which case the fullscreen and maximized flags must be preserved as pending flags so the window will be restored to the proper state when shown/mapped on restoration.
2024-03-03 18:01:25 -05:00
Sam Lantinga 9be35d4603 Convert mappings using labeled buttons to positional buttons
We were accidentally skipping all of the mappings that used the SDL_GAMECONTROLLER_USE_BUTTON_LABELS hint, because they used the '!' negate operator with a default hint value of 1. Instead we just want to use that hint to determine whether the mapping has positional buttons or not, and swap the buttons as needed.

Fixes https://github.com/libsdl-org/SDL/issues/9190
2024-03-03 14:17:03 -08:00
Sam Lantinga ccd309c433 Added a mapping for the Sanwa Supply JY-P76USV controller
Fixes https://github.com/libsdl-org/SDL/issues/8644
2024-03-03 12:23:00 -08:00
Sam Lantinga 8d8076263e Removed the mapping for the G-Shark GS-GP702
This uses the same chipset as the DragonRise Inc. Generic USB Joystick, which many manufacturers use for different products with different mappings.

In order to add a mapping for a controller using this chipset, we need a unique crc for the device name.
2024-03-03 12:18:57 -08:00
Sam Lantinga 1b86a1c684 SDL_GetGamepadAppleSFSymbolsNameForAxis() returns NULL if the symbol isn't found 2024-03-03 11:55:40 -08:00
Sam Lantinga 5f37242607 Don't clear the clipboard on quit
Fixes https://github.com/libsdl-org/SDL/issues/8830
2024-03-03 11:48:08 -08:00
Sam Lantinga 6e03914375 Fixed signed/unsigned comparison warning 2024-03-03 11:36:23 -08:00
Sam Lantinga 2c85052966 Removed unused headers from SDL_rect.h
Fixes https://github.com/libsdl-org/SDL/issues/8966
2024-03-03 11:33:59 -08:00
Sam Lantinga e54001b028 Updating the mouse capture should use the mouse focus window
Fixes https://github.com/libsdl-org/SDL/issues/8974
2024-03-03 11:32:17 -08:00
Sam Lantinga c1da39a245 SDL_GetGamepadAppleSFSymbolsNameForButton() returns NULL if the symbol isn't found
Fixes https://github.com/libsdl-org/SDL/issues/9071
2024-03-03 11:07:39 -08:00
Sam Lantinga 74f4614289 Save the native texture parent and return that in SDL_GetRenderTarget()
Fixes https://github.com/libsdl-org/SDL/issues/9176
2024-03-03 09:47:40 -08:00
Susko3 86d36a2dc2 Add missing include 2024-03-03 09:37:59 -08:00
Sam Lantinga eb5a2e7e7f Fixed building with SDL_LEAN_AND_MEAN
Fixes https://github.com/libsdl-org/SDL/issues/9173
2024-03-03 09:25:02 -08:00
Sam Lantinga 107e06a92a Use a valid finger ID when generating touch events from mouse events
Fixes https://github.com/libsdl-org/SDL/issues/9185
2024-03-03 09:15:07 -08:00
meyraud705 c6ec999869 Set udev class for accelerometer 2024-03-03 08:40:24 -08:00
Nour Fouad e524e545f2 Add vulkan to SDL_HINT_RENDER_DRIVER 2024-03-02 15:17:09 -08:00
Sam Lantinga 88dcf74588 testyuv: we no longer need to override the HDR headroom for the BT.2020 test 2024-03-02 15:06:28 -08:00
SDL Wiki Bot 27389716ac Sync SDL3 wiki -> header 2024-03-02 23:05:24 +00:00
Sam Lantinga 7f9ff6277c Don't assume HDR headroom for HDR10 surfaces
Applications that support HDR will set the correct values for their content.
2024-03-02 15:02:17 -08:00
Jade Macho c74f273848 d3d12: Move root sigs to D3D12_Shader_Common.hlsli, fix mismatch 2024-03-02 10:30:29 -08:00
Jade Macho e2a8209263 GDK: Use WIN_IsRectEmpty (IsRectEmpty is desktop-only) 2024-03-02 10:30:29 -08:00
Jade Macho 290f64b86c GDK: Windows shape is desktop-only 2024-03-02 10:30:29 -08:00
Jade Macho 794f0f1b42 GDK: Fix SDL_pixels.c/_c.h linking error caused by C / C++ mismatch 2024-03-02 10:30:29 -08:00
Jade Macho 23ace600fc GDK: Remove old shader sources, unify shader compilation .bats 2024-03-02 10:30:29 -08:00
Jade Macho bcbede31ce GDK: SDL_video_capture.c is now SDL_camera.c, thus remove from proj 2024-03-02 10:30:29 -08:00
Jade Macho e1e5d33420 GDK: Partially revert 2670eb44af
MsgWaitForMultipleObjects is desktop-only.
2024-03-02 10:30:29 -08:00
SDL Wiki Bot 8c015cd3b6 Sync SDL3 wiki -> header 2024-03-02 18:02:26 +00:00
Sam Lantinga 8d023f9869 Updated documentation for new property parameters 2024-03-02 09:56:29 -08:00