Commit Graph

14855 Commits (3bc27d385684b7fa605d3ddaf86a997198653b9b)

Author SHA1 Message Date
Anonymous Maarten 3bc27d3856 hidapi_libusb: use SDL_wcscmp and SDL_wcslcpy from SDL 2024-03-10 09:07:33 -07:00
Anonymous Maarten 0e6fcf947a cmake: find libusb through LibUSB cmake module 2024-03-10 09:07:33 -07:00
Tolik708 2a775cad6f Named typedef-ed structs Gave name to structs that were defined like anonymous struct with name given by typedef. Example 'typedef struct {...} Foo;' -> 'typedef struct Foo {...} Foo;' 2024-03-10 09:04:18 -07:00
Sam Lantinga 37d066b99b Clarify what pitch means (thanks @zlago!) 2024-03-10 09:02:59 -07:00
Frosty-J f9d018c808 Add flag to registerReceiver on Android 2024-03-10 09:01:07 -07:00
Green Sky 4de30a26a2 x11: workaround issues with primary selection and clipboard temporal ignorance 2024-03-10 08:59:44 -07:00
Simon McVittie 76defc5c82 joystick: Remove redundant CHECK_JOYSTICK_MAGIC in SDL_GetJoystickName
Since commit 0dfdf1f3 "Fixed crash if joystick functions are passed a
NULL joystick", we've already done this check by the time we get to
this point.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-09 08:40:04 -08:00
a dinosaur 41baf23e44 cmake: fix empty framework prefix on MacOS 2024-03-09 08:18:47 -08:00
Nour Fouad b6c5ad0075 Update hardcoded value of pi to use SDL constant SDL_PI_F for improved consistency and readability. 2024-03-08 20:49:01 -08:00
Sam Lantinga fcb132b8e8 Allow building testffmpeg without Vulkan support 2024-03-08 16:45:27 -08:00
Sam Lantinga 16e0806ced Note that the cursor clip has been cleared even if we didn't do it
This releases the mouse cursor when bringing up the console on Counter Strike in dev mode.
2024-03-08 15:56:49 -08:00
Mingjie Shen 19b3ddac2f Fix TOCTOU race condition
Separately checking the state of a file before operating on it may allow
an attacker to modify the file between the two operations. (CWE-367)
Fix by using fstat() instead of stat().
2024-03-08 15:52:04 -08:00
Sam Lantinga cde793b0f5 Added support for the 6-button SEGA Mega Drive Control Pad for Nintendo Online
Closes https://github.com/libsdl-org/SDL/pull/9225
2024-03-08 12:33:54 -08:00
Ozkan Sezer d86ff6c6c0 remove stale / wrong information from SDL_RWread() documentation 2024-03-08 18:55:40 +03:00
Ozkan Sezer 9e89f093d9 remove stale / wrong information from SDL_RWread() documentation 2024-03-08 18:55:19 +03:00
Sam Lantinga 790cd395f5 Make sure the type in the SDL_Event aligns properly across the union 2024-03-07 06:58:43 -08:00
Sam Lantinga e9ab2d46de Revert "Change `SDL_Keycode` type to an enum"
SDL_Keycode can actually be any printable character on the keyboard, so isn't limited to the enumerated values of SDL_KeyCode.
2024-03-07 06:58:43 -08:00
Sam Lantinga 33eaddc565 Cleaned up various type conversion issues
This makes sure SDL_PixelFormatEnum flows through the internal code correctly, as well as fixing a number of other minor issues.
2024-03-07 06:58:43 -08:00
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