Commit Graph

15019 Commits (9e460ce6a6ab1640ca630dfb8d0c46b04cebb68a)

Author SHA1 Message Date
Susko3 f8844d387c Use specific types in SDL_touch.h
Missed when picking 7ff34249c753122a2ba67e78aa6e9f9b56aa4a65 from https://github.com/libsdl-org/SDL/pull/9191.
2024-03-06 10:35:20 -08:00
Sam Lantinga 26b9178e5c Fixed whitespace 2024-03-06 09:57:39 -08:00
Sam Lantinga c07b39fa06 Fixed build 2024-03-06 09:57:39 -08:00
SDL Wiki Bot 2d0cd90171 Sync SDL3 wiki -> header 2024-03-06 17:52:26 +00:00
Sam Lantinga 860155680d SDL_RegisterEvents() now returns 0 if it couldn't allocate any user events. 2024-03-06 09:51:15 -08:00
Ozkan Sezer 4d20b82850 SDL_RWFromFile, stdio: allow named pipes along with regular files.
Fixes https://github.com/libsdl-org/SDL/issues/9174

(cherry picked from commit 177a836653e0d2690ff8802dade165c392502f81)
2024-03-06 18:51:20 +03:00
Sam Lantinga ee87132385 Make sure fast path RGB <-> YUV conversions are using the same color primaries 2024-03-05 17:43:08 -08:00
Sam Lantinga 4545c77c9e Updated Vita renderer with colorspace clarification 2024-03-05 16:56:58 -08:00
Sam Lantinga 95fbbc6f07 Fixed accidental use of tabs 2024-03-05 16:55:26 -08:00
Susko3 e268cdbec6
Use specific types in public headers (#9205)
Uses specific typedef'd types instead of generic integral types where applicable.
2024-03-05 16:52:15 -08:00
Sam Lantinga db24560387 Additional colorspace clarification
Note that SDL_MATRIX_COEFFICIENTS_BT470BG is functionally equivalent to SDL_MATRIX_COEFFICIENTS_BT601
2024-03-05 16:47:36 -08:00
Sam Lantinga b3858ec5f7 BT2020_CL is very different from BT2020_NCL, and not currently supported 2024-03-05 15:49:17 -08:00
Frank Praznik 4c0601b93f video: Return a failure code if the video driver fails to grab the mouse or keyboard
Alter the video driver grab/confinement function signatures to return an int, set and return an error if the grab request fails, and clear the grab flags from the window if the mouse and/or keyboard wasn't actually grabbed.
2024-03-05 17:59:10 -05:00
Sam Lantinga ae0caeef8d Fixed build 2024-03-05 13:54:17 -08:00
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