Commit Graph

14837 Commits (f53bdc953154e689bc843657134bf719591f0798)

Author SHA1 Message Date
Sam Lantinga f53bdc9531 The pixel format in SDL_DisplayMode uses SDL_PixelFormatEnum 2024-03-07 03:39:06 -08:00
Sam Lantinga 57a160c9ab Fixed mapping for the Sanwa Supply JY-P76USV controller 2024-03-06 20:53:48 -08:00
Sam Lantinga 5643fd683f Added migration notes for enum type changes 2024-03-06 16:59:28 -08:00
Anonymous Maarten 3cc4705dd2 cmake: build OBJC sources with warning & error flags, ignoring deprecated declarations 2024-03-07 01:58:28 +01:00
SDL Wiki Bot 59ab5c0824 Sync SDL3 wiki -> header 2024-03-07 00:20:27 +00:00
Sam Lantinga c70710cde8 SDL_GetPixelFormatEnumForMasks() returns SDL_PixelFormatEnum 2024-03-06 16:19:08 -08:00
Susko3 01248a99c8 Add `default: break;` to switches on SDL_Event::type
This is just a nice-to-have, as `SDL_Event::type` in an `Uint32`, so there are no
compiler errors about not handling all `SDL_EventType` enum values.
2024-03-06 15:40:05 -08:00
Susko3 722f4104bf Use enums as types in SDL_*Event structures
The main `SDL_Event` union is not using the enum as
valid user events types are not in the enum.
2024-03-06 15:40:05 -08:00
Susko3 641b911d38 Update some internal files to use `SDL_WindowFlags` 2024-03-06 15:08:12 -08:00
Susko3 ce44eff3d2 Use `SDL_WindowFlags` in public headers 2024-03-06 15:08:12 -08:00
Susko3 4f58d18373 Typedef `SDL_WindowFlags`
Window flags were previously an enum with the same name.
See ebd7f9adbd.
2024-03-06 15:08:12 -08:00
Susko3 424616e032 Use SDL_PixelFormatEnum as type 2024-03-06 15:02:13 -08:00
Sam Lantinga 38c54b8e0e More null checks for SDL window operations 2024-03-06 13:33:30 -08:00
Sam Lantinga 6664a089d8 Add missing null check for displaydata during window creation
Found in the wild from minidump reports. Unclear displaydata is null, but according
to the API it is possible for this call to return null so it seems like a valid check.
2024-03-06 13:33:27 -08:00
Sam Lantinga 610e798406 Fix clicking on the titlebar causing mouse input to freeze until esc is pressed
When the titlebar drage region is clicked two actions are triggered:
  * The WM transfers focus to the application
  * The application starts a drag operation because the drag region was clicked

When the drag operation starts before input has been transferred to the application the
window manager gets in a bad state where mouse clicks don't work and the system isn't
actually dragging.

In this CL we delay drag operations until after the application has acquired active focus.
This fixes the problems outlined above.
2024-03-06 13:33:23 -08:00
Sam Lantinga 65a718f8c6 Disable warning C4113 in SDL_windows_gaming_input.c
- A new version of warning C4028 added in VS 2022.
2024-03-06 13:33:20 -08:00
Frank Praznik 53896c9e44 cocoa: Make keyboard grab function return an int 2024-03-06 15:53:24 -05:00
Susko3 f8cb3c742d Change `SDL_Keycode` type to an enum 2024-03-06 12:17:53 -08:00
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