Sam Lantinga
134b47730b
Added support for linear and pixel art scaling for palettized textures
2025-10-04 15:12:08 -07:00
Anonymous Maarten
e1fde46a6a
Include SDL_internal.h before checking HAVE_FRIBIDI_H
...
This happened to work because of precompiled headers
2025-10-04 21:25:45 +02:00
Anonymous Maarten
f69981cbfb
Use space indendation in SDL_fribidi sources
2025-10-04 21:25:45 +02:00
Michael Fitzmayer
dc1cc98e2b
N-Gage: Add SDL_TimeToDateTime() implementation ( #14141 )
...
Add simple but working SDL_TimeToDateTime() implementation.
Fixes https://github.com/libsdl-org/SDL/issues/14047
2025-10-04 20:00:27 +03:00
Frank Praznik
bcf3afb6f3
wayland: Suppress initial keymap changed events during initialization
2025-10-04 10:54:32 -04:00
Frank Praznik
8fda4231cf
wayland: Optimize the legacy key level fallback function
...
When iterating over the keymap entries, a valid xkb state object has already been allocated, so use that instead of allocating/destroying a new state object for every lookup, which avoids a calloc/free operation inside libxkbcommon. Any state set by the level lookup function will be overwritten with valid state after keymap iteration has completed.
2025-10-04 10:54:32 -04:00
Frank Praznik
2c02e6f8bb
wayland: Restore valid state information when building keymaps
...
The spec doesn't guarantee that a modifier event won't arrive before a keymap event, or that it will always be sent after a keymap change if the modifiers and layout index haven't changed, so restore any valid state after allocation when building a new keymap.
2025-10-04 10:54:32 -04:00
Simon McVittie
1c1f7082ab
Only emit dlopen note for SDL_FRIBIDI_DYNAMIC if not a hard dependency
...
Fixes: 65b36721 "unix: Mark SDL_FRIBIDI_DYNAMIC as a weak dependency"
Thanks: Anonymous Maarten
2025-10-04 17:21:49 +03:00
Simon McVittie
65b367216e
unix: Mark SDL_FRIBIDI_DYNAMIC as a weak dependency
...
Signed-off-by: Simon McVittie <smcv@collabora.com >
2025-10-04 14:15:19 +03:00
Simon McVittie
f7f33cbd36
x11: Clean up trailing whitespace in SDL_x11toolkit.[ch]
...
Signed-off-by: Simon McVittie <smcv@collabora.com >
2025-10-04 14:10:00 +03:00
Simon McVittie
2a96bddebf
unix: Clean up trailing whitespace in SDL_fribidi.c
...
Signed-off-by: Simon McVittie <smcv@collabora.com >
2025-10-04 14:10:00 +03:00
Sam Lantinga
f3815ede24
Rebuilt GPU renderer shaders
2025-10-03 19:35:45 -07:00
eafton
c2429e85ec
X11TK: Add Arabic/Hebrew/Farsi support by increasing font size slightly and using FriBidi. ( #14134 )
2025-10-03 19:08:24 -07:00
Sam Lantinga
49d51a0d3c
Removed TEXTURETYPE_PALETTE_PIXELART
...
This doesn't make any sense since the pixel art algorithm uses a box filter to get an average pixel value which isn't possible with indexed textures.
2025-10-03 18:54:07 -07:00
Sam Lantinga
ac2c834021
Fixed build
2025-10-03 16:04:45 -07:00
Sam Lantinga
1cda789a37
render: Default to primary display in SDL_CalculateSimulatedVSyncInterval if window is not set
...
- Fixes previous change to SDL_CreateRendererWithProperties which skipped SDL_CalculateSimulatedVSyncInterval if window was not set.
2025-10-03 16:00:44 -07:00
Sam Lantinga
0cab3521f1
render: Fix asserts from null window usage in SDL_CreateRendererWithProperties
2025-10-03 16:00:41 -07:00
Sam Lantinga
32668c4ddd
Palettized textures will always use SDL_SCALEMODE_NEAREST.
...
Our algorithm for pixel art doesn't work on 8-bit images, needs further investigation.
Fixes https://github.com/libsdl-org/SDL/issues/14129
2025-10-03 14:29:47 -07:00
Sam Lantinga
d333044462
Fixed destination coordinates when using scale with the software renderer
...
Fixes https://github.com/libsdl-org/SDL/issues/14051
2025-10-03 13:58:45 -07:00
Sam Lantinga
b7b2e8bc31
Don't change the display of a window until it is mostly on the new one
...
Fixes https://github.com/libsdl-org/SDL/issues/12665
2025-10-03 12:38:47 -07:00
Sam Lantinga
baae2a628d
Store the current window display ID on the window
2025-10-03 12:38:47 -07:00
Nintorch
6e6dc500b5
Add blacklist words for gamepad names
2025-10-03 09:44:56 -07:00
nmlgc
f39e49a3dd
SDL_mslibc: Implement _ftoul2_legacy()
...
cl.exe versions ≥v19.41 call this builtin for double → uint64_t
conversions on x86. SDL currently needs such conversions in:
* MainCallbackRateHintChanged()
* SDL_PrintFloat()
* WIN_ApplyWindowProgress()
This seems enough to justify implementing this function rather than
trying to work around it, as it was done in sdl12-compat:
https://github.com/libsdl-org/sdl12-compat/issues/352
This implementation was taken from ReactOS:
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f637e6b809adb5e0ae420ef4f80c73b19172a2e7
Passes the stdlib testautomation, and also matches the behavior of
Microsoft's 64-bit libc for the currently implementation-defined case
of calling SDL_PrintFloat() with values >SDL_MAX_UINT64.
2025-10-03 07:21:20 -07:00
Ryan C. Gordon
0467c531fa
wasapi: Check for a NULL device during disconnect handling.
...
This is probably something we already cleaned up that has something running
in an unexpected order now that we've moved disconnect work to the main thread.
2025-10-03 09:36:31 -04:00
Sam Lantinga
b1c2dd8433
Make sure the current resolution is in the fullscreen mode list
...
Custom resolutions don't enumerate normally, but make sure the current resolution is in the mode list.
Fixes https://github.com/libsdl-org/SDL/issues/11551
2025-10-02 15:19:41 -07:00
Ryan C. Gordon
24b47814f8
emscripten: Another attempt at optionally having the canvas use whole window.
...
Fixes #11949 .
2025-10-02 13:01:35 -04:00
Frank Praznik
e5c28c5326
wayland: Fix variable scope
2025-10-02 12:02:57 -04:00
Sam Lantinga
a864dcac25
Added support for using the GPU renderer as an offscreen renderer
...
SDL_CreateGPURenderer() now allows passing in an existing GPU device and passing in a NULL window to create an offscreen renderer.
Also renamed SDL_SetRenderGPUState() to SDL_SetGPURenderState().
2025-10-01 23:32:18 -07:00
Frank Praznik
9461db1ec8
Fix typo
2025-10-01 19:21:10 -04:00
Frank Praznik
9182b8ab61
wayland: Add a fallback for xkb_keymap_key_get_syms_by_level() for old xkbcommon versions
...
This function is only available since version 1.0.0, but the SDL minimum is 0.5.0, and Steam Runtime 2 'soldier' uses 0.8.2, so add a fallback function with similar functionality for older versions.
xkb_keymap_key_get_mods_for_level() is more efficient, so it is still favored when available.
2025-10-01 17:59:07 -04:00
Sam Lantinga
8d7cd3c6c2
Fixed line endings
2025-10-01 14:01:59 -07:00
Sam Lantinga
33c849d030
Always enable object validation when checking is explicitly enabled
2025-10-01 13:53:19 -07:00
Sam Lantinga
f66e4d0a43
Enable full object validation by default
...
Full object validation was always done before this hint and there are a number of shipping products that relied on this, so don't change it by default.
2025-10-01 12:46:33 -07:00
Mathieu Eyraud
86da08b0be
Zero-initialize SDL_GPUDevice
2025-10-01 07:22:17 -07:00
Mathieu Eyraud
409bb7722c
Fix uninitialized variables
2025-10-01 07:21:44 -07:00
Sam Lantinga
9735c45db6
Added an advanced shader for the GPU renderer
...
This allows us to support YUV colorspaces and HDR in the GPU renderer.
Fixes https://github.com/libsdl-org/SDL/issues/11281
Fixes https://github.com/libsdl-org/SDL/issues/11282
2025-10-01 07:17:55 -07:00
Sam Lantinga
fe3b399b7e
Added support for P010 pixel format in SDL_UpdateNVTexture()
2025-10-01 07:17:55 -07:00
Sam Lantinga
548063e578
Fixed pixel shader for palettized textures using pixelart scaling
2025-10-01 07:17:55 -07:00
Frank Praznik
b54c5fd79c
x11: Check for a valid input context before destroying it
...
XDestroyIC crashes if passed a null parameter.
2025-09-30 14:48:39 -04:00
Sam Lantinga
8a5f9a3837
Removed validate_feature_indirect_draw_first_instance_disabled (thanks @rabbit-ecl!)
...
It was incorrectly checking the direct draw functions instead of checking indirect draw buffers.
2025-09-30 11:36:29 -07:00
eafton
76308181b9
Fix #14072
2025-09-30 08:41:23 -07:00
Wohlstand
e3d65796f4
SDL_render_psp.c: Implemented working viewport support
...
Backported from the SDL2 branch
2025-09-29 19:09:26 -07:00
Sam Lantinga
15f1cb4c98
Added GPU API support on visionOS
...
You must set SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN to false on this platform, since setDepthClipMode is not supported on Apple headsets (as of visionOS 2.3) and clipping is the default.
2025-09-29 13:28:00 -07:00
Sam Lantinga
2809ce9389
Set enable_depth_clip to true by default if SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN is false
2025-09-29 13:28:00 -07:00
Sam Lantinga
f61e271e11
Generalize and validate optional GPU feature properties
...
Fixes https://github.com/libsdl-org/SDL/issues/13139
Fixes https://github.com/libsdl-org/SDL/issues/13138
2025-09-29 12:42:47 -07:00
Sam Lantinga
595f7b7ed9
Revert "Fixed Vulkan validation error"
...
This reverts commit b82b1f416f .
The renderer should not be enabling depth clamping.
2025-09-29 06:08:27 -07:00
Ozkan Sezer
5fffa8b9ad
SDL_video_unsupported.c: fix SDL_iOSAnimationCallback type redefinition error
2025-09-29 08:41:14 +03:00
Sam Lantinga
b65590159b
Each application palette corresponds to one hardware palette
...
When the application modifies the palette, any textures that use it will automatically be updated.
2025-09-28 22:10:06 -07:00
Sam Lantinga
5d311635cf
Added Vulkan support for palettized textures
2025-09-28 22:10:06 -07:00
Sam Lantinga
e2fe23ddab
Added hardware accelerated support for palettized textures
...
Supported backends: direct3d, direct3d11, direct3d12, gpu, metal, opengl, opengles2
2025-09-28 22:10:06 -07:00