Ozkan Sezer
ee5289ef09
mark SDL_ClipboardTextCallback as SDLCALL
2024-02-11 18:55:40 +03:00
Hans-Kristian Arntzen
69f2bd151e
Fix broken use of MsgWaitForMultipleObjects.
...
- Timeout < 0 was not handled properly
- Return value for success is WAIT_OBJECT_0 + nCount, not positive value
2024-02-10 06:55:51 -08:00
Chris Collins
0f81598e9f
Wayland: Avoid SEGV if a modifier notification comes before the keymap
2024-02-10 10:39:57 +01:00
Sam Lantinga
f95b7ee4da
Renamed SDL_HasWindowSurface to SDL_WindowHasSurface
...
Fixes https://github.com/libsdl-org/SDL/issues/9034
2024-02-09 17:42:18 -08:00
Sam Lantinga
f6b92c9b88
Re-added a simplified version of SDL_SetWindowShape()
...
In order to handle mouse click transparency this needs to be implemented inside SDL
2024-02-09 16:04:46 -08:00
Sam Lantinga
d777becd9d
Fixed spacing
2024-02-08 10:26:42 -08:00
Sam Lantinga
dd726cb097
Moved rgb24_yuv420_std() to the correct header
2024-02-07 14:42:12 -08:00
Sam Lantinga
1673d52351
Fixed building with an older macOS SDK
2024-02-07 13:49:42 -08:00
Sam Lantinga
4ec5aef028
Disable warning C4214: nonstandard extension used: bit field types other than int
...
This shows up with Visual Studio 2019 and is a non-standard extension that we rely on in this code.
2024-02-07 13:23:29 -08:00
Sam Lantinga
faeb2b1f22
Fixed warning C4204: nonstandard extension used: non-constant aggregate initializer when built with Visual Studio 2019
2024-02-07 13:16:35 -08:00
Sam Lantinga
9e194c1a1d
Added BT.601/SMPTE240 to the color primaries conversion matrices
2024-02-06 18:16:41 -08:00
pastdue
7b74e2eeb8
Emscripten_SetWindowFullscreen: Fix crash due to uninitialized EmscriptenFullscreenStrategy members
2024-02-06 16:25:30 -08:00
Sam Lantinga
8afba41aef
Added support for HDR10 video on Apple platforms
2024-02-06 15:40:47 -08:00
Sam Lantinga
c79462dc50
Fixed Xcode build warnings
2024-02-06 12:29:44 -08:00
Sam Lantinga
ba074acad4
Implemented scRGB colorspace and HDR support on macOS
2024-02-06 12:29:44 -08:00
Sam Lantinga
30e176d6ba
Added HDR display properties and related event
...
Also added an HDR calibration stage to testcolorspace
2024-02-06 02:48:05 -08:00
Sam Lantinga
c3e4481d56
Use a reasonable default for unspecified YUV colorspace
2024-02-05 11:47:17 -08:00
Sam Lantinga
809f02e89e
SDL_ReadSurfacePixel() now supports large pixel formats
2024-02-05 11:47:17 -08:00
Sam Lantinga
e74171b1ae
Added support for HDR10 video playback on direct3d11
...
Fixes https://github.com/libsdl-org/SDL/issues/8053
2024-02-05 09:45:39 -08:00
meyraud705
f85535b4b6
Use functions from SDL instead of libc
2024-02-05 09:01:28 -05:00
Sam Lantinga
dab77fe29b
Added support for SDL_COLORSPACE_BT709_FULL to the hardware renderers
2024-02-04 13:09:40 -08:00
Omar Rashwan
67bbf20add
Null check SDL_DBusContext pointer
2024-02-03 14:04:46 -08:00
Sam Lantinga
200f87ea0b
Only set the colorspace if it's not the default
...
This avoids property hash table allocation in most cases
2024-02-03 12:00:55 -08:00
Sam Lantinga
c3e821fa80
Optimized SDL_DuplicatePixels()
2024-02-03 11:49:15 -08:00
Sam Lantinga
89b9d6cbdc
SDL_RenderReadPixels() now returns a surface
...
Fixes https://github.com/libsdl-org/SDL/issues/8977
2024-02-03 11:49:15 -08:00
Sam Lantinga
50a805cdd1
Use YUV colorspaces instead of a global YUV conversion mode
...
Fixes https://github.com/libsdl-org/SDL/issues/8669
2024-02-03 07:36:18 -08:00
Wohlstand
9e76f23561
SDL_windowsopengl.c: WGL: Fixed null-pointer dereference crash
...
Fixes #8968
Fixed crash after 594a79c2f9
(cherry picked from commit a29f37c14a )
2024-02-03 06:19:41 -08:00
Sam Lantinga
e67e0c5d55
vulkan_metal.h: Make compatible with ObjC ARC (thanks @jmroot!)
...
(re)Fixes #6598
We need to remember to apply this again once we update from upstream headers.
2024-02-02 18:29:59 -08:00
Sam Lantinga
ba86d9f235
When changing surface format, use the default colorspace for the new format
2024-02-02 17:56:33 -08:00
Sam Lantinga
f6f9468d84
Fixed warning C4701: potentially uninitialized local variable 'srcpixel' used
2024-02-01 21:24:11 -08:00
Sam Lantinga
19dde63e7c
Added a simple linear scale for tonemapped HDR to SDR surface conversion
2024-02-01 12:17:35 -08:00
Sam Lantinga
c1f3c81003
Make the color primary conversion code reusable
...
Also added conversion from rec709 to rec2020 primaries
2024-02-01 12:17:35 -08:00
Ozkan Sezer
c00b6a8e20
SDL_kmsdrmvideo.c: clean-up includes, add clarifying note after 5ab879f
2024-02-01 11:04:10 +03:00
Sam Lantinga
6f443e2aca
Added support for the scRGB colorspace on D3D11 and D3D12
2024-01-31 18:07:00 -08:00
Sam Lantinga
4b3c530dd1
Fixed out of bounds access
...
This can happen if we try to blit from a surface with an unknown pixel format
2024-01-31 09:55:52 -08:00
Sam Lantinga
3c45544a14
Added a slow blit function to handle large pixel formats and colorspace conversion
2024-01-31 09:50:46 -08:00
Frank Praznik
482a27bc00
wayland: Throttle to 20hz if the frame callback never fires
...
Matches SDL2, and should be enough to keep most games from desyncing/timing out.
A proper fix for FIFO presentation without the frame callback mess is being worked on upstream, so this whole hack should be rendered obsolete in the near future.
2024-01-30 17:12:20 -05:00
Sam Lantinga
61b5c38e6e
Added the initial concept of colorspace to SDL
2024-01-28 18:24:39 -08:00
Frank Praznik
fbf10afb31
wayland: Consolidate window creation logic
...
The fractional scale manager and viewport are both created for a surface under the same circumstances, so consolidate the logic.
2024-01-28 18:15:39 -05:00
Frank Praznik
2e96307b27
wayland: Always create a viewport for the surface, if possible
...
Toggling viewports on and off can cause visual anomalies such as flicker when moving windows between displays on a mixed-DPI configuration or toggling the scaled fullscreen modes. If the viewport protocol is avilable, always create a viewport for the surface, unless it is an unscaled external surface, in which case the surface should be left untouched as an application may wish to attach its own viewport or use integer scaling.
This allows for the removal of several helper functions as well.
2024-01-28 17:52:35 -05:00
Frank Praznik
fbebbab90d
wayland: Only set the explicit logical window size when using display scaling
...
Otherwise, the standard width/height is already in points/screen units.
2024-01-28 13:31:42 -05:00
Frank Praznik
879ba46ade
wayland: Make sure the logical window size can't go to zero.
...
libdecor can send a size of zero as a valid value, the use of which will close the window. Make sure the minimum width/height are clamped to a minimum of 1.
2024-01-28 13:31:42 -05:00
Frank Praznik
b97cda226f
wayland: Refactor internal variable names for better readability
...
Add descriptions in the internal window struct as well.
2024-01-28 13:31:42 -05:00
Frank Praznik
5b8ca05f1a
wayland: Add a forced screen space scaling mode
...
Add a mode that forces Wayland windows to output with scaling that forces 1:1 pixel mapping.
This is intended to allow legacy applications to be displayed without desktop scaling being applied, and may have issues with some display configurations, as this forces the window to behave in a way that Wayland desktops were not designed to accommodate (rounding errors can result from certain combinations of window/scale values, the window may be unusably small, jump in size at times, or appear to be larger than the desktop space, and cursor precision may be reduced).
Windows flagged as DPI-aware are not affected by this.
The automated video test suite passes with the hint turned on.
2024-01-28 13:31:42 -05:00
Ryan C. Gordon
dcd26a80e5
windows: Minor tweaks that makes Windows XP vidmodes work again.
...
(thanks @madebr!)
Fixes #8328 .
Reference Issue #8666 .
2024-01-27 20:15:08 -05:00
Ryan C. Gordon
6ca596cfc1
windows: Manage MapVirtualKey vs Windows XP.
...
Reference Issue #8666 .
2024-01-27 20:15:08 -05:00
Ryan C. Gordon
1c5bc53738
windows: Manage WideCharToMultiByte vs Windows XP.
...
Reference Issue #8666 .
2024-01-27 20:15:08 -05:00
Sam Lantinga
3b55c7d1f4
Shortened SDL property names
2024-01-27 13:00:50 -08:00
Sam Lantinga
dff76bf295
Enable text input on video initialization without popping up an on-screen keyboard
...
Fixes https://github.com/libsdl-org/SDL/issues/8561
(cherry picked from commit 4ff3b28273 )
2024-01-27 12:00:39 -08:00
Sam Lantinga
b9ea2dde44
Added VisionOS as a supported target to the Xcode project
...
Also added SDL_PLATFORM_VISIONOS to the platform definitions and generally switched from TARGET_OS_* macros to SDL_PLATFORM_* macros.
2024-01-27 11:07:21 -08:00