Commit Graph

8867 Commits

Author SHA1 Message Date
Sam Lantinga
39cfb437ed Renamed SDL_HINT_LINUX_DIGITAL_HATS to SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS 2024-02-12 09:54:33 -08:00
Sam Lantinga
b557c15bcf Renamed SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE to SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE 2024-02-12 09:54:33 -08:00
Sam Lantinga
4f628b5b62 Renamed SDL_HINT_GDK_TEXTINPUT_DEFAULT to SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT 2024-02-12 09:54:33 -08:00
Sam Lantinga
fd5d761128 Renamed SDL_HINT_DIRECTINPUT_ENABLED to SDL_HINT_JOYSTICK_DIRECTINPUT 2024-02-12 09:54:33 -08:00
Sam Lantinga
a5da7d0dd5 Renamed SDL_HINT_ALLOW_TOPMOST to SDL_HINT_WINDOW_ALLOW_TOPMOST 2024-02-12 09:54:33 -08:00
Sam Lantinga
9ce7fe2848 Removed SDL_HINT_ACCELEROMETER_AS_JOYSTICK
Sensors are a first-class object in SDL and we haven't gotten any feedback that this feature is useful these days.

Closes https://github.com/libsdl-org/SDL/pull/7879
2024-02-12 09:54:33 -08:00
Zack Middleton
5af7113842 Rename property define names to have a type suffix
Renamed the following property define names to have a type suffix to
match other property names.

SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET (number)
SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET (number)
SDL_PROP_WINDOW_CREATE_WAYLAND_SCALE_TO_DISPLAY (boolean)
SDL_PROP_WINDOW_RENDERER (pointer)
SDL_PROP_WINDOW_TEXTUREDATA (pointer)
2024-02-12 09:54:11 -08:00
Sam Lantinga
cacac6cc34 Updated structure and field names for consistency
Type names are camel case and field names are snake case except for fields ending in id, which are capitalized.

Fixes https://github.com/libsdl-org/SDL/issues/6955
2024-02-11 08:27:56 -08:00
Ozkan Sezer
97d6e58a19 mark SDL_CleanupWindowTextureData as SDLCALL. 2024-02-11 18:55:40 +03:00
Ozkan Sezer
ee5289ef09 mark SDL_ClipboardTextCallback as SDLCALL 2024-02-11 18:55:40 +03:00
Ozkan Sezer
168322f358 SDL_properties.c: mark CleanupFreeableProperty and CleanupSurface as SDLCALL 2024-02-11 17:29:20 +03:00
Sam Lantinga
bba2a5d360 Added SDL_SetFreeableProperty() for internal use 2024-02-10 08:04:27 -08: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
1162097135 Added SDL_RenderViewportSet() to tell whether the viewport was previously set to a specific rectangle.
Fixes https://github.com/libsdl-org/SDL/issues/9029
2024-02-09 16:37:04 -08:00
Sam Lantinga
3ebbf0f409 Guarded ElementAlreadyHandled with #ifdef ENABLE_PHYSICAL_INPUT_PROFILE (thanks @Donione!)
Fixes https://github.com/libsdl-org/SDL/issues/9033
2024-02-09 16:12:33 -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
b7c61569f8 Redefine XINPUT_CAPABILITIES_EX as an SDL typedef
mingw-w64 has added this from Proton (which added this from SDL), so we need to re-define it as a local symbol to avoid conflicting with mingw-w64 headers.

Fixes https://github.com/libsdl-org/SDL/issues/9031
2024-02-09 01:26:45 -08:00
Sam Lantinga
bfcca2a36e Use saturate() instead of clamp() for slightly faster shader operation 2024-02-08 16:05:42 -08:00
Sam Lantinga
d777becd9d Fixed spacing 2024-02-08 10:26:42 -08:00
Sam Lantinga
91639d855f Don't use the direct3d12 renderer with transparent windows
Fixes https://github.com/libsdl-org/SDL/issues/9024
2024-02-08 09:24:11 -08:00
Sam Lantinga
26e947f8ea Added VIDPID for OpenFFBoard wheel (thanks @groybe!)
Closes https://github.com/libsdl-org/SDL/pull/7987
2024-02-07 16:34:50 -08:00
Sam Lantinga
c951bbe3de Look at all available usages when determining whether to ignore a device 2024-02-07 16:02:12 -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
1c4c29b7ad Fixed a swap chain leak and a double-free in testffmpeg.c
Also added more debug logging to the direct3d11 renderer
2024-02-06 21:33:57 -08:00
Sam Lantinga
3158342441 Use SDL_Color for SDL_RenderGeometryRaw() and add SDL_RenderGeometryRawFloat()
Eventually we can re-add a fast path for that data down to the individual renderers. Setting color scale would still require converting to float, and most hardware accelerated renderers prefer to consume colors as float, so this requires some thought and performance testing.

Fixes https://github.com/libsdl-org/SDL/issues/9009
2024-02-06 18:16:41 -08:00
Sam Lantinga
9e194c1a1d Added BT.601/SMPTE240 to the color primaries conversion matrices 2024-02-06 18:16:41 -08:00
Sam Lantinga
fb823fbe95 Make sure we're actually using the HDR10 colorspace before using that shader 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
985da79d73 Use a more concise representation of YUV -> RGB conversion 2024-02-06 15:40:47 -08:00
Sam Lantinga
8afba41aef Added support for HDR10 video on Apple platforms 2024-02-06 15:40:47 -08:00
Sam Lantinga
2039c46d2c Added support for creating an SDL texture from a CVPixelBufferRef 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
d4caef5b89 Generalize SDR white level handling into a color scale
This gives applications better control over how and when light levels are adjusted when working with HDR content and display.
2024-02-06 02:48:05 -08:00
meyraud705
82d89ff4fb Fix memory leak in SDL_UpdateSteamVirtualGamepadInfo() 2024-02-06 01:55:47 -08:00
Sam Lantinga
b05ea8e04e Updated direct3d12 renderer with HDR10 and SDR whitelevel support 2024-02-05 13:17:10 -08:00
Sam Lantinga
c3e4481d56 Use a reasonable default for unspecified YUV colorspace 2024-02-05 11:47:17 -08:00
Sam Lantinga
240158f3e8 Scale SDR content to SDR whitelevel when HDR is enabled 2024-02-05 11:47:17 -08:00
Sam Lantinga
e97b2061b4 Converted shader headers to UNIX line endings 2024-02-05 11:47:17 -08:00
Sam Lantinga
e98e5abd2a Added batch file to create D3D12 shaders 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
9755e490c0 Workaround for crash at shutdown in testffmpeg
I'm not sure if this is something in SDL crashing or something in ffmpeg, but it's safer to leave the D3D DLLs loaded.
2024-02-05 09:45:39 -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