Ethan Lee
0cc2b026e7
gpu: Check for MSFT_layered_driver, skip layered drivers during enumeration
2025-11-10 18:16:54 -05:00
Frank Praznik
f3d39815e7
progressbar: Ensure buffers are large enough for string manipulation
2025-11-09 16:59:35 -05:00
Frank Praznik
f6a05121ec
wayland: Handle dispatch errors when showing a window
...
If a dispatch event when showing a window returns a failure code, handle the display disconnected condition and break out of the loop, otherwise, it will hang forever.
2025-11-09 12:38:05 -05:00
Frank Praznik
5d0236ad51
wayland: Don't leave un-acked configurations when throttling resize events
...
Compositors that send multiple resize events per frame could result in the most recent configuration requests being left un-acked when the resize ends. Ack the most recent resized state on frame callbacks, so as to always ack the most recent configuration within a reasonable timeframe.
2025-11-09 12:38:04 -05:00
Sam Lantinga
a96664674f
Fixed windows events on 32-bit Windows
...
When running on 32-bit Windows, DefWindowProc resolves to a function in ntdll.dll, but after the window is created the actual window proc is a function in user32.dll. We solve this by using our own custom default window proc and looking for that instead.
Fixes https://github.com/libsdl-org/SDL/issues/1442
2025-11-09 07:44:45 -08:00
Eddy Jansson
836dad75ae
Remove redundant semicolons.
...
[ci skip]
2025-11-09 07:29:27 -08:00
Marcin Serwin
53ee410d7a
Don't divide by zero in slow blitter
...
Other blitters seem to handle zero width/height destinations correctly.
Signed-off-by: Marcin Serwin <marcin@serwin.dev >
2025-11-09 07:26:04 -08:00
unknown
b9c790949e
wasapi: Don't ignore device disconnect events on unopened devices.
...
Reference Issue #13317 .
2025-11-09 01:15:45 -05:00
Ryan C. Gordon
2f41dd7b5c
pen: Better pen position precision on Windows 8 and later.
...
Fixes #12084 .
2025-11-09 00:46:45 -05:00
Sam Lantinga
704ac98d3f
Make sure the blit mapping is cleared when undoing RLE encoding
...
This fixes a crash if a surface is RLE encoded, then locked and unlocked.
We also mark the surface as no longer needing to be locked after undoing RLE encoding
2025-11-08 15:38:47 -08:00
Sam Lantinga
089dc86bcf
Lazily redo RLE encoding
...
Also stop lying about the RLE encoding state, which causes crashes if we do RLE blit operations while the surface is locked.
2025-11-08 14:51:27 -08:00
Sam Lantinga
cc2a272d6f
Enable RLE more often in the software renderer
...
We don't need to aggressively disable RLE acceleration anymore because the original pixels remain available for operations that aren't supported by the RLE blitter.
2025-11-08 14:51:27 -08:00
Sam Lantinga
ac0edbe9d2
Just assert that RLE encoding isn't active
...
We undo RLE encoding in the calling code, so we shouldn't need to do anything here.
2025-11-08 14:51:27 -08:00
Sam Lantinga
2b365983db
Save the original pixels when RLE encoding is enabled
...
Trying to reconstruct the original image when undoing RLE encoding was never completely accurate.
Fixes https://github.com/libsdl-org/SDL/issues/14424
2025-11-08 12:56:25 -08:00
Sam Lantinga
78152d13ee
Added SDL_ConvertSurfaceRect() for internal use
2025-11-08 12:56:25 -08:00
Sam Lantinga
d145e78cd6
Improved performance scaling 8-bit surfaces
2025-11-08 12:56:25 -08:00
Sam Lantinga
01d359c1df
Don't create a larger surface than we need when scaling
2025-11-08 12:56:25 -08:00
Sam Lantinga
7d628ef76c
Fixed scaling YUV surfaces
2025-11-08 12:56:25 -08:00
Sam Lantinga
7553d5892e
Fixed software renderer 8-bit scaling and rotation (thanks @jroatch!)
...
Fixes https://github.com/libsdl-org/SDL/issues/14422
2025-11-08 08:46:58 -08:00
Chris Genova
6a01d6e7d3
D3D12 GPU: Prevent reading out of bounds when uploading textures.
...
When the upload needs realignment, a new buffer is created to do the
upload, and the source data is copied to the new buffer. This commit
fixes the issue where the memcopy can read off the end of the source
buffer since it is reading based on destination pitch instead of source
pitch.
2025-11-07 17:47:51 -08:00
Sam Lantinga
1fb663b429
Make sure that SDL_PIXELFORMAT_ARGB8888 is the first texture format for OpenGL
...
Fixes https://github.com/libsdl-org/SDL/issues/1440
2025-11-07 11:13:50 -08:00
Sam Lantinga
3489a45216
Use srcpixel now that we've set it
2025-11-07 11:12:10 -08:00
Sam Lantinga
294beceec7
Fixed error: 'srcpixel' may be used uninitialized
2025-11-07 11:11:31 -08:00
Sam Lantinga
0f21e46586
Added support for SDL_PIXELFORMAT_INDEX8 to SDL_BlitTriangle_Slow()
...
Fixes https://github.com/libsdl-org/SDL/issues/14419
2025-11-07 11:01:23 -08:00
Sam Lantinga
547b2a2e37
SDL_SetSurfaceRLE() has a boolean parameter
2025-11-07 11:01:23 -08:00
Frank Praznik
950a9a72ab
wayland: Use a pool to allocate icon image buffers
...
Allocate the buffers from a pool to avoid a separate mmap for each image.
2025-11-07 13:53:00 -05:00
Frank Praznik
b3060956c3
wayland: Release the SHM pool after initial cursor buffer creation
...
The backing memory will be automatically unmapped when the buffer objects are destroyed, so no need to keep the pool around.
2025-11-07 13:53:00 -05:00
Sam Lantinga
9a19cc8323
Fixed unaligned load in Xbox HIDAPI driver
2025-11-07 10:37:58 -08:00
Sam Lantinga
118dcf27ce
Added D mode mappings for the 8BitDo 64 Bluetooth Controller
...
The HID descriptor maps the C buttons as a right thumbstick, but this mapping matches the HIDAPI Nintendo 64 mapping.
The start button resets the controller in both USB and Bluetooth mode on macOS, but I've kept the mapping assuming this is a macOS bug that will be fixed.
2025-11-07 10:18:49 -08:00
Sam Lantinga
9ff737efbd
Updated the Nintendo Switch N64 controller mapping
...
This mapping matches the Linux kernel default mapping.
2025-11-07 10:18:49 -08:00
Sam Lantinga
f211a3bb69
Fixed initial rumble on the 8BitDo 64 Bluetooth Controller
2025-11-07 10:18:49 -08:00
Daniel Ludwig
ef5b1c8f5f
Fix DefWindowProc called for events handled in WIN_WindowProc
2025-11-07 07:57:40 -08:00
Sam Lantinga
a2ed1a4197
Fixed blitting bitmaps with a non-zero x offset
...
Also added basic testautomation coverage of bitmap blits
Fixes https://github.com/libsdl-org/sdl2-compat/issues/546
2025-11-06 22:47:50 -08:00
Frank Praznik
a71b2f0a93
x11: Only correct placement for border offset on the initial window mapping
...
Correcting it when it is subsequently hidden and re-mapped will cause the position to be double offset by the size of the borders.
2025-11-06 19:35:15 -05:00
Sam Lantinga
2a873be9cd
Return false from SDL_SetWindowMouseRect() if it's not supported
2025-11-06 11:59:47 -08:00
Sam Lantinga
599bd1a6aa
Fixed building if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO isn't defined
2025-11-06 11:30:59 -08:00
Sam Lantinga
e24eeefbd1
The default render texture format is SDL_PIXELFORMAT_ARGB8888
...
We do this for consistency across backends
2025-11-06 09:46:43 -08:00
Sam Lantinga
ca072c9fc6
Don't do anything if the window mouse rect hasn't changed
2025-11-06 09:18:58 -08:00
Mathieu Eyraud
de5b8a1c45
Remove useless call to SetTextureAddressMode()
2025-11-06 08:25:00 -08:00
Mathieu Eyraud
7ad4911584
Remove incorrect and useless call to SetTextureScaleMode()
...
SetTextureScaleMode() is called a few lines below with correct arguments.
2025-11-06 08:25:00 -08:00
Ozkan Sezer
616c21d730
SDL_camera_v4l2.c: fix build against old kernel headers.
2025-11-06 18:28:50 +03:00
Mathieu Eyraud
80af7d3ccd
Fix error handling of X11Toolkit_InitWindowPixmap
2025-11-06 07:25:29 -08:00
Mathieu Eyraud
d17b8412f1
Fix potential NULL pointer dereference
2025-11-06 07:24:47 -08:00
Yevgen Abramov
04af745fec
Add support for V4L2 XB24 (32-bit RGBX) camera format
2025-11-06 07:13:04 -08:00
Sam Lantinga
c94da8977d
Validate SPI read command in the Nintendo Switch HIDAPI driver
2025-11-05 17:34:22 -08:00
Sam Lantinga
9a1745f2c8
Fixed unaligned access in the Nintendo Switch HIDAPI driver
2025-11-05 17:08:22 -08:00
Ryan C. Gordon
7324823b3e
emscripten: Send resize events when screen orientation changes.
...
The canvas _might_ be changing sizes, if you've set up your own CSS for it, or
are using SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT.
Reference Issue #7359 .
2025-11-05 15:52:38 -05:00
Yevgen Abramov
b09b557fc6
Fix V4L2 frame rate numerator comparison in SDL3 camera
...
Signed-off-by: Yevgen Abramov <eabramov84@gmail.com >
2025-11-05 10:56:03 -08:00
Sam Lantinga
49134ecf25
Pass the error through from the SetRelativeMouseMode() implementation
2025-11-03 13:07:17 -08:00
Sam Lantinga
05887f2087
Return false from SDL_SetWindowRelativeMouseMode() if relative mode isn't available
...
Fixes https://github.com/libsdl-org/SDL/issues/14388
2025-11-03 13:01:41 -08:00