Commit Graph

14395 Commits (dcd26a80e5aeb26d40c32129c91bdafc7d88af2d)

Author SHA1 Message Date
Ozkan Sezer 07a0c0e402 SDL_hidapi.c: adjust for new SDL_PLATFORM_WINDOWS meaning. 2024-01-24 21:20:50 +03:00
Ozkan Sezer 34f03207c4 SDL_cpuinfo.c: adjust for new SDL_PLATFORM_WINDOWS meaning. 2024-01-24 21:20:50 +03:00
Ozkan Sezer fd6ec3b9aa SDL_intrin.h: adjust for new SDL_PLATFORM_WINDOWS meaning. 2024-01-24 21:20:50 +03:00
Ozkan Sezer 2654c52d0e macro SDL_PLATFORM_WINDOWS now means Win32 api and Windows-based OS's.
macro SDL_PLATFORM_WIN32 means desktop windows, i.e. anything other than
WinRT or GDK, etc.
2024-01-24 21:20:50 +03:00
Sam Lantinga 1ac9602909 Make sure we include the matching copy of vk_video headers 2024-01-24 09:40:16 -08:00
Sam Lantinga fc74bf8455 Update to the latest version of the Khronos headers 2024-01-24 09:40:16 -08:00
Ozkan Sezer 12b01ef674 rename_macros.py: fix typo for __WIN32__ 2024-01-24 20:10:00 +03:00
Simon McVittie a06ee5b98d Don't try to use SDL platform macros in configure-time checks
At the point that we run this, nothing SDL-specific is set up yet.
__APPLE__ is a compiler predefined macro that forms part of the API on
Apple platforms, so it's fine to rely on it.

This partially reverts commit 31d133db.

Fixes: 31d133db "Define SDL_PLATFORM_* macros instead of underscored ones (#8875)"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-01-24 14:12:50 +03:00
Simon McVittie f61870cfb4 Go back to using compiler built-in macros in ARM assembly code
These files don't #include SDL headers, so SDL-specific macros will
never be defined here.

This partially reverts commit 31d133db.

Fixes: 31d133db "Define SDL_PLATFORM_* macros instead of underscored ones (#8875)"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-01-24 14:12:50 +03:00
Simon McVittie ed421f4fd8 Revert Khronos headers to upstream version
These are third-party headers, so it's best if they're identical to the
upstream version rather than using SDL-specific macros or coding style.

This partially reverts commits b6ae281e and 31d133db.

Fixes: 31d133db "Define SDL_PLATFORM_* macros instead of underscored ones (#8875)"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-01-24 14:12:50 +03:00
Sam Lantinga 8fe257b541 Added support for other HDR color primaries
Specifically, SDL_COLOR_PRIMARIES_XYZ, SDL_COLOR_PRIMARIES_SMPTE431, and SDL_COLOR_PRIMARIES_SMPTE432
2024-01-23 20:35:29 -08:00
Ozkan Sezer c5792cc0de SDL_thread.h: replace uses of __GDK__ and __WINRT__ (missed in #8875.) 2024-01-24 06:28:10 +03:00
Anonymous Maarten 31d133db40
Define SDL_PLATFORM_* macros instead of underscored ones (#8875) 2024-01-24 01:40:51 +00:00
SDL Wiki Bot ceccf24519 Sync SDL3 wiki -> header 2024-01-24 01:20:29 +00:00
Sam Lantinga 7cd914593f Added HDR surface properties and tone mapping from HDR to SDR
This currently only supports PQ, but can be expanded in the future
2024-01-23 17:19:41 -08:00
Sam Lantinga a71f99c71f Fixed ambiguity between std::byte and byte in rpcndr.h
Fixes https://github.com/libsdl-org/SDL/issues/8911
2024-01-23 09:00:02 -08:00
SDL Wiki Bot 6fb188eb35 Sync SDL3 wiki -> header 2024-01-23 03:24:26 +00:00
Sam Lantinga cd231a65f6 Added SDL_GetJoystickCaps() and SDL_GetGamepadCaps() to get the capabilities of controllers
Also added SDL_GAMEPAD_CAP_PLAYER_LED to let the application know if the controller has a visible player LED
2024-01-22 19:23:42 -08:00
Ryan C. Gordon c88c12148d SDL_ShowMessageBox: Remove `#ifdef`s and respect SDL_VIDEO_DRIVER hint.
Fixes #8892.
2024-01-22 19:29:36 -05:00
Frank Praznik 5f65fd360d wayland: Free the input struct in all initialization failure paths 2024-01-22 13:01:04 -05:00
Frank Praznik 84e47b4af5 wayland: Always create the backing input store, even if there is no seat
Fixes a crash if no seat was available at initialization, but still allows for one to still be created later if an input device is added.

Removes some unnecessary abstractions in the process.
2024-01-22 12:37:24 -05:00
Sam Lantinga 99ce8af439 Fixed warning C4244: '=': conversion from 'Sint64' to 'int', possible loss of data
(cherry picked from commit 12bab1c981edbd9092d58f8479d00032d248d0ce)
2024-01-22 08:39:47 -08:00
Sam Lantinga a28a42cfc6 Fixed declaration of SDL_HapticRumbleSupported 2024-01-21 11:36:38 -08:00
Sam Lantinga 052b958bf2 Made SDL_HapticEffect const in the API
Also added some additional parameter validation to haptic effect functions
2024-01-21 11:29:40 -08:00
Sam Lantinga fa5bfe577c Fixed warnings building for UWP 2024-01-21 06:55:29 -08:00
Sam Lantinga 3e541eab22 Fixed error: 'fq' may be used uninitialized [-Werror=maybe-uninitialized] 2024-01-21 06:55:29 -08:00
Sam Lantinga 8f20ef5b43 Re-enable C runtime with Mingw, and disable the problematic math test 2024-01-21 06:55:29 -08:00
Sam Lantinga 1f177be1e4 Disable the Mingw C runtime by default
Mingw seems to have a bad pow implementation in the C runtime:
'Pow(-72.300000,12.000000), expected [20401381050275984310272.000000], got 20401381050275996893184.000000': Failed
2024-01-21 06:55:29 -08:00
Sam Lantinga 5e70ee29cc Build SDL with the static C runtime on Visual Studio 2024-01-21 06:55:29 -08:00
Sam Lantinga e2f35a16c2 Added <string.h> for declaration of memset() and memcpy() 2024-01-21 06:55:29 -08:00
Sam Lantinga 7a069cc4b0 Allow optimizing memcpy and memset where possible
Modern C runtimes have well optimized memset and memcpy, so use those instead of dispatching into SDL's versions. In addition, some compilers can analyze memset and memcpy calls and directly turn them into optimized assembly.
2024-01-21 06:55:29 -08:00
Frank Praznik 8d25c2d260 video: Fix window manager initiated fullscreen window moves
Distinguish between and handle fullscreen window moves initiated by the window manager vs the application to avoid cases where the window snaps back to the original display when moved due to the use of old coordinates.
2024-01-20 13:31:43 -05:00
Sam Lantinga 8c7f5b73e8 Fixed build
The flip directions aren't 1 and -1, just use SDL_FLIP_NONE for now
2024-01-20 08:42:52 -08:00
SDL Wiki Bot 4d6e2d8b73 Sync SDL3 wiki -> header 2024-01-20 14:33:19 +00:00
Sam Lantinga 308906ba25 Added SDL_FlipSurface() to flip a surface vertically or horizontally
Fixes https://github.com/libsdl-org/SDL/issues/8857
2024-01-20 06:31:37 -08:00
Sylvain 2cd583ee13 Prevent asan warning on qsort():
'src/stdlib/SDL_qsort.c:27:5: runtime error: null pointer passed as argument 1, which is declared to never be null`
2024-01-20 11:26:02 +01:00
Sam Lantinga 5db543a66a Just use the khronos headers for the checks that need them 2024-01-19 23:55:05 -08:00
Sam Lantinga 4b82bed259 Fixed building with the steamrt/scout SDK 2024-01-19 23:02:48 -08:00
Sam Lantinga 116c60c5b0 Run EGL/GLES cmake tests with the Khronos headers available 2024-01-19 22:31:40 -08:00
Sam Lantinga b552f26e6a Fix building with the steamrt/scout SDK 2024-01-19 22:31:40 -08:00
Sylvain 7b02d328fa Fixed overflow in SDL_SoftStretch() (see #8878) 2024-01-20 06:38:34 +01:00
Sam Lantinga 64972b4184 Fixed build 2024-01-19 17:21:05 -08:00
Sam Lantinga 6a00ae7e58 Fixed rendering diagonal lines within a viewport
The drawing uses the origin of the viewport as the coordinate origin, so we only need to clip against the size of the viewport.

Also added a unit test to catch this case in the future
2024-01-19 16:29:38 -08:00
Sam Lantinga 8d9c7d8ebe SDL_UpdateFullscreenMode: Only restore mouse position when exiting fullscreen if the fullscreen mode actually changed
- Previously we would skip most of UpdateFullscreenMode if not entering fullscreen and the window was not set as fullscreen for any display
  which prevented running this.

This prevents warping the mouse when hiding a non-fullscreen window
2024-01-19 15:26:46 -08:00
Sam Lantinga a73132177d Make sure the render target isn't bound as a resource
Fixes https://github.com/libsdl-org/SDL/issues/3380
2024-01-19 15:17:30 -08:00
Sam Lantinga 09ba55b462 Fixed crash scaling very large surfaces
Fixes https://github.com/libsdl-org/SDL/issues/8878
2024-01-19 13:06:12 -08:00
Sam Lantinga aa3fc6e904 Fixed D-pad on Xbox One controllers using the HIDAPI driver 2024-01-19 11:43:01 -08:00
Sylvain Becker 3639743d89
Fixed bug #7614: Segmentation Fault in SDL_BlitSurface (#7808)
Update SDL_BlitSurface to use Intersect functions
2024-01-19 08:39:57 -08:00
Sam Lantinga bd5d4d61ed Fixed potential overflow in software triangle rendering 2024-01-19 08:31:56 -08:00
Sam Lantinga b566bfce07 Fixed warning C4152: nonstandard extension, function/data pointer conversion in expression 2024-01-19 06:49:53 -08:00