Sam Lantinga
bc85c55350
testcontroller: create window with high pixel density
...
This improves the picture quality when running on an iPhone.
2025-02-22 09:02:01 -08:00
Sam Lantinga
75bbcbf87b
Added support for Motion JPEG pipewire camera capture
2025-02-22 00:23:03 -08:00
Sam Lantinga
fcd41c1d2c
Check desired window area when checking zoom state
...
isZoomed returns true if the window has the size and position that it would if it were maximized, so we need to check to see if our floating state matches that before saying we're zoomed.
This fixes calling zoom:nil on a borderless resizable window that was created with the same size as the usable desktop area, which happens to also be the maximized state.
Fixes https://github.com/libsdl-org/SDL/issues/12228
2025-02-21 18:38:12 -08:00
Sam Lantinga
911e53dece
Retain mouse focus as long as we're getting mouse events
...
Fixes https://github.com/libsdl-org/SDL/issues/12218
Fixes https://github.com/libsdl-org/SDL/issues/12323
2025-02-21 15:35:28 -08:00
Sam Lantinga
3b8cb62283
Make it easier to enable IME debug logs
2025-02-21 15:24:45 -08:00
Sam Lantinga
2e346d7166
Added 32-bit texture formats to Texture_GetBlockWidth() and Texture_GetBlockHeight()
...
Fixes https://github.com/libsdl-org/SDL/issues/12335
2025-02-21 09:29:18 -08:00
Sam Lantinga
5d776c070a
Refactored SDL_CreateJoystickName() into a general SDL_CreateDeviceName()
2025-02-21 09:10:54 -08:00
Sam Lantinga
9267930fea
Added a fast path for converting the same format and pitch
2025-02-20 12:16:26 -08:00
Sam Lantinga
f24f9d3bed
Revert "testcamera: added support for Motion JPEG camera frames"
...
This reverts commit 5ccee77190 .
2025-02-20 12:16:26 -08:00
Sam Lantinga
2e89c53ebc
Added support for decoding MJPG into NV12 textures
2025-02-20 12:16:26 -08:00
Sam Lantinga
06602f4e80
Document that the pitch is the length of the image data for SDL_PIXELFORMAT_MJPG
2025-02-20 12:16:26 -08:00
Sam Lantinga
a792434a37
Added initial MJPG support using stb_image
2025-02-20 12:16:26 -08:00
Sam Lantinga
1a38960eee
Call SDL_DiscardAllCommands() for the software renderer as well
2025-02-20 09:53:11 -08:00
Sam Lantinga
8f4c5e15f1
Finish any drawing when destroying a software renderer
...
Fixes the SDL3 version of https://github.com/libsdl-org/sdl2-compat/issues/373
2025-02-20 08:49:47 -08:00
Sam Lantinga
6ef687c864
Simplified and fixed media foundation buffer handling
2025-02-17 08:14:30 -08:00
Sam Lantinga
de12cb92dc
Fixed crash at shutdown with new hashtable code
2025-02-17 08:14:30 -08:00
Sam Lantinga
1754943596
Fixed camera frame acquisition on Windows 7
...
Fixes https://github.com/libsdl-org/SDL/issues/12210
2025-02-16 08:13:35 -08:00
Sam Lantinga
e3d9f1172c
Remove the reference to the thread when it is detached
...
Fixes https://github.com/libsdl-org/SDL/issues/12301
2025-02-16 07:56:30 -08:00
Sam Lantinga
fd4e6d2949
Don't render 0 sized texture rectangles
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/355
2025-02-15 07:07:56 -08:00
Sam Lantinga
5b98c4a524
Fixed motion events with TOOL_TYPE_UNKNOWN
...
This happens using hand tracking on a VR headset, and should be treated like normal touch interaction.
2025-02-14 11:50:43 -08:00
Sam Lantinga
3de975884a
Document the "trace" log priority
2025-02-12 21:37:30 -08:00
Sam Lantinga
b9d018f2a2
Fixed wayland cursor use-after-free at shutdown
2025-02-12 20:47:31 -08:00
Sam Lantinga
d2b7a84651
Fixed SDL_GetNumGamepadTouchpads() returning 1 for a NULL gamepad
2025-02-12 13:08:41 -08:00
Sam Lantinga
ca29304ce1
Fixed continually resetting keyboard and mouse readings
2025-02-12 13:02:15 -08:00
Sam Lantinga
f67c644649
Fixed reporting hat positions for GameInput controllers
2025-02-12 13:02:15 -08:00
Sam Lantinga
1b35ca9c32
Refactored GameInput initialization
2025-02-12 13:02:15 -08:00
Sam Lantinga
715c18739b
Added an internal hint "SDL_VIDEO_X11_XINPUT2" for sdl2-compat
2025-02-11 15:11:33 -08:00
Sam Lantinga
ce69e98989
Copy SDL2_SYSWMEVENT data into temporary memory for the event
2025-02-11 15:11:33 -08:00
Sam Lantinga
99cf16287a
Fixed the name of SDL_SYSWMEVENT
2025-02-11 09:48:40 -08:00
Sam Lantinga
6c37971521
Removed the mapping for the Sanwa Supply JY-P76USV
...
It turns out the mapping we include doesn't work for real controllers, and they're using a generic chipset and generic name and can't be generally distinguished from other controllers.
See https://github.com/libsdl-org/SDL/issues/8644 for details.
2025-02-11 07:59:25 -08:00
Sam Lantinga
0bce19cf15
The 10-bit texture formats have alpha on Direct3D
...
A similar change was made for Vulkan in https://github.com/libsdl-org/SDL/commit/a036aeda3b27ce7e115ebf25e717adf0bdabe91e
2025-02-10 19:45:02 -08:00
Sam Lantinga
3cfa476d3f
Added support for SDL_PIXELFORMAT_ABGR8888 textures
...
This is the output format of stb_image for image decoding, so let's avoid a texture format conversion where possible.
Also standardized SDL_PIXELFORMAT_ARGB8888 as the default texture format for all renderers.
2025-02-10 19:45:02 -08:00
Sam Lantinga
5ccee77190
testcamera: added support for Motion JPEG camera frames
2025-02-10 17:18:16 -08:00
Sam Lantinga
cf41ccc6ce
Removed stb_image.h from SDL
...
This adds quite a bit of code size to SDL for a niche use-case. This is easily handled in the application instead.
2025-02-10 17:18:16 -08:00
Sam Lantinga
9308404e9a
Removed functions not used by SDL
2025-02-10 17:18:16 -08:00
Sam Lantinga
5e31bbf05e
Remove functions not used when STBI_NO_PNG and STBI_NO_HDR are defined
2025-02-10 17:18:16 -08:00
Sam Lantinga
84b0c13c44
Added support for Motion JPEG camera capture
...
Fixes https://github.com/libsdl-org/SDL/issues/12183
2025-02-10 17:18:16 -08:00
Sam Lantinga
0bc1f87120
Added SDL_PROP_SURFACE_HOTSPOT_X_NUMBER and SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER
2025-02-10 12:15:03 -08:00
Sam Lantinga
ecd089bb69
Don't return short waits from SDL_IOReady()
...
The Wayland keyboard repeat code assumes that if we have a certain timeout then we'll wait at least that long, and generate a key repeat event on timeout. If we wait a shorter time, we won't generate a key repeat event and then return 0, even if we were supposed to wait indefinitely.
Fixes https://github.com/libsdl-org/SDL/issues/12239
2025-02-10 10:29:30 -08:00
Sam Lantinga
f6126e9ea1
Centered joystick axis values should be 0
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/338
2025-02-10 08:36:00 -08:00
Sam Lantinga
982094c85c
Updated to version 3.2.5 for development
2025-02-06 16:40:59 -08:00
Sam Lantinga
b5c3eab6b4
Updated to version 3.2.4 for release
2025-02-06 16:03:43 -08:00
Sam Lantinga
48c00bfe6c
Fixed creating a window with both software and hardware renderer attached
2025-02-06 15:35:38 -08:00
Sam Lantinga
ad8429f1b0
Let the renderer always see window events
...
These are necessary for proper operation of the renderer and shouldn't be blocked by event filters, etc.
2025-02-06 14:38:20 -08:00
Sam Lantinga
c59ac249d2
Revert "wayland: Don't send size events while the window is hidden"
...
This reverts commit 0825d07a43 .
It turns out that resizing while hidden is fine, the real problem in https://github.com/libsdl-org/sdl2-compat/issues/268 is that SDL2 did not send an initial resize event and SDL3 does, which we're fixing in a better way in sdl2-compat.
2025-02-06 14:37:53 -08:00
Sam Lantinga
a646dc89e5
Note that SDL_GUIDToString() and SDL_StringToGUID() are thread-safe.
2025-02-06 10:44:21 -08:00
Sam Lantinga
8397e1fcc0
Fix up SDL2 style mappings for HIDAPI controllers
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/316
2025-02-06 09:21:52 -08:00
Sam Lantinga
7691cabe4a
Removed incorrect HIDAPI gamepad mapping
2025-02-06 08:37:10 -08:00
Sam Lantinga
6782cfe2c5
Don't use the HIDAPI driver for Thrustmaster wheels
...
Closes https://github.com/libsdl-org/SDL/pull/12173
2025-02-05 17:19:59 -08:00
Sam Lantinga
1c0e2b7f97
SDL_OpenHapticFromJoystick() returns a valid haptic object
2025-02-05 17:08:41 -08:00
Sam Lantinga
c4550d906a
testcontroller: show the gamepad device type
2025-02-05 08:27:26 -08:00
Sam Lantinga
b99e19c0a2
Fixed potential double-free
2025-02-05 00:04:45 -08:00
Sam Lantinga
8ba8cca69b
Fixed memory leak looking up pen tool names
2025-02-04 23:59:08 -08:00
Sam Lantinga
2cd2834dfe
Fixed memory leak in the pen cleanup
...
Fixes https://github.com/libsdl-org/SDL/issues/12099
2025-02-04 23:49:12 -08:00
Sam Lantinga
07c22da464
Fixed decoding 4-bit RLE encoded BMP files
...
Also flipped the return value of readRlePixels() to match convention.
Fixes https://github.com/libsdl-org/sdl2-compat/issues/308
2025-02-03 19:34:38 -08:00
Sam Lantinga
94409d3504
Added Switch Input-only controller entries for Zuiki MasCon controller for Nintendo Switch.
...
The device string indicates RED on the one I have and is PIDs 0003 and some other posts online say 0001 for the normal model, so I'll try 0001-0003 to get all 3 color variants
2025-02-03 16:49:29 -08:00
Sam Lantinga
a8a2874ef4
Added distinct VID/PIDs for the PS4 vs Xbox eSwap Pro controllers
2025-02-03 13:26:04 -08:00
Sam Lantinga
84bc2abdad
Corrected the entry for the PXN V900 racing wheel
2025-02-03 13:11:02 -08:00
Sam Lantinga
eac07bda0a
Sort the controller lists by VID/PID
2025-02-03 12:39:53 -08:00
Sam Lantinga
6243a06539
Call the windows message hook for WM_ENTERSIZEMOVE and WM_ENTERMENULOOP
...
Fixes https://github.com/libsdl-org/SDL/issues/12169
2025-02-03 09:17:17 -08:00
Sam Lantinga
8e51b2468a
Renamed SDL_SoftStretch() to SDL_StretchSurface()
...
Fixes https://github.com/libsdl-org/SDL/issues/12168
2025-02-03 08:51:32 -08:00
Sam Lantinga
8848f86560
Corrected the version where SDL_SoftStretch() was added
2025-02-02 14:13:13 -08:00
Sam Lantinga
a98a4b8a68
Re-added SDL_SoftStretch() to the API
...
This is needed for sdl2-compat, since a blit is not quite equivalent.
2025-02-02 13:41:36 -08:00
Sam Lantinga
c06172dc1c
Track mouse button state by real mouse ID
...
We'll switch to the global mouse ID just once we are ready to deliver events.
This makes sure that any button events that come in for a specific mouse ID maintain that state if we switch to relative mode and start using that mouse ID for events.
Fixes https://github.com/libsdl-org/sdl2-compat/issues/263
2025-02-02 12:58:45 -08:00
Sam Lantinga
be991239d9
Updated to version 3.2.3 for development
2025-02-01 17:43:38 -08:00
Sam Lantinga
2fa1e7258a
Updated to version 3.2.2 for release
2025-02-01 17:01:45 -08:00
Sam Lantinga
235022fe2f
Fixed error C2059: syntax error: '}'
...
Fixes https://github.com/libsdl-org/SDL/issues/12155
2025-02-01 15:32:58 -08:00
Sam Lantinga
bc3264130d
Fixed mouse motion events while the mouse is grabbed
...
When the mouse is grabbed, the X server sends mouse events only to the grabbing client, and XInput2 events for the master device are not delivered.
We should consider using the window mouse rect confinement instead of a true X server grab for SDL mouse grab functionality.
2025-01-31 23:45:09 -08:00
Sam Lantinga
69d361dee1
Ignore SDL_HINT_RENDER_DRIVER set to software when creating a window surface
...
We handled the case where software was in a list of render drivers, but not when the hint was set to exactly "software".
Fixes https://github.com/libsdl-org/sdl2-compat/issues/266
2025-01-31 15:49:58 -08:00
Sam Lantinga
4c6d949e6d
wayland: make sure the desktop mode is in the fullscreen mode list
...
Fixes https://github.com/libsdl-org/SDL/issues/12079
2025-01-31 14:53:40 -08:00
Sam Lantinga
ab5cb707a6
Fixed enabling call logging
2025-01-31 14:22:29 -08:00
Sam Lantinga
16f8122a0d
Keep the simplest mapping of scancode + modifer for a given keycode
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/259
2025-01-31 12:07:08 -08:00
Sam Lantinga
8298d60e4a
Dynamically load CreateWaitableTimerExW and SetWaitableTimerEx
...
These functions are not available on Windows XP
2025-01-29 05:40:49 -08:00
Sam Lantinga
409f3ade88
Removed SDF test program
...
There's a much better example of SDF support in testgputext in SDL_ttf
2025-01-29 04:15:27 -08:00
Sam Lantinga
4176e188bf
Enable testgles2 on all platforms
...
We use SDL's headers so we're not dependent on system OpenGL header availability.
2025-01-29 04:03:31 -08:00
Sam Lantinga
2a946e91bc
android: updated release build SDK to match documented requirements
2025-01-28 06:03:37 -08:00
Sam Lantinga
44edbf7137
Use templates for the package support files
...
This makes them more easy to reuse in other projects.
2025-01-28 06:03:37 -08:00
Sam Lantinga
1c7cc60286
Skip IsRegularFileOrPipe() check on Emscripten
...
The sandbox guarantees that this will be true.
Fixes https://github.com/libsdl-org/SDL/issues/12108
2025-01-27 22:25:12 -08:00
Sam Lantinga
5f8e0ebf58
Fixed memory leak at shutdown
2025-01-26 19:30:29 -08:00
Sam Lantinga
17625e20df
Removed redundant step in Visual Studio instructions
2025-01-22 13:26:11 -08:00
Sam Lantinga
c806c271c5
Tweaked emscripten introduction
2025-01-22 13:05:44 -08:00
Sam Lantinga
74536243dd
Emscripten works well using the normal CMake workflow
2025-01-22 12:56:32 -08:00
Sam Lantinga
6f3d0b3cdb
Fixed build when using an older Xcode SDK
...
Fixes https://github.com/libsdl-org/SDL/issues/12048
2025-01-21 18:17:02 -08:00
Sam Lantinga
77b520e93e
Updated to version 3.2.1 for development
2025-01-21 14:02:06 -08:00
Sam Lantinga
535d80bade
Include the README and related files in the SDL framework
2025-01-21 10:51:21 -08:00
Sam Lantinga
ed2920afef
All SDL 3.0 release symbols are at version 3.2.0
2025-01-21 10:19:21 -08:00
Sam Lantinga
b775135b4f
Removed temporary debug code
2025-01-21 08:57:08 -08:00
Sam Lantinga
a52fc209bb
Updated to version 3.2.0 for release
2025-01-21 08:52:28 -08:00
Sam Lantinga
8526868563
dialog: cleaned up D-Bus portal implementation
...
Fixes https://github.com/libsdl-org/SDL/issues/12036
2025-01-20 22:57:42 -08:00
Sam Lantinga
b476695e67
Call the windows message hook while inside a modal message loop
...
Fixes https://github.com/libsdl-org/SDL/issues/12029
2025-01-20 15:56:23 -08:00
Sam Lantinga
075c0337cd
Removed debug print statement
2025-01-20 13:11:19 -08:00
Sam Lantinga
a036aeda3b
The Vulkan renderer doesn't actually support RGB texture formats
...
Fixes https://github.com/libsdl-org/SDL/issues/10400
2025-01-20 13:09:49 -08:00
Sam Lantinga
9b454a762c
Revert "testautomation: don't validate alpha values on XRGB formats"
...
This reverts commit 759e01bd64 .
It's better to return the expected format from SDL_RenderReadPixels() than skip alpha testing.
2025-01-20 12:57:48 -08:00
Sam Lantinga
759e01bd64
testautomation: don't validate alpha values on XRGB formats
...
The results are not defined, and some renderers set 0xFF always and other renderers set the alpha to blend results, even though it won't be used when rendering.
Fixes --filter render_testBlendModes with D3D renderers
2025-01-20 11:29:41 -08:00
Sam Lantinga
c698c61f03
renderer: initialize the surface colorspace correctly
...
Fixes https://github.com/libsdl-org/SDL/issues/12027
2025-01-20 10:48:13 -08:00
Sam Lantinga
c975f77b0f
Update joysticks and so forth during live resize
...
Fixes https://github.com/libsdl-org/SDL/issues/12022
2025-01-20 10:11:31 -08:00
Sam Lantinga
362f96a6cf
testcontroller: use SDL_MAIN_USE_CALLBACKS so updates happen during live resizing
2025-01-20 10:11:31 -08:00
Sam Lantinga
f8040b2e01
Use UIKeyboardTypeDecimalPad for number fields on iOS
...
Fixes https://github.com/libsdl-org/SDL/issues/12025
2025-01-20 09:09:57 -08:00
Sam Lantinga
5f2dd5f04e
tray: fixed multi-threading issues with GTk implementation
...
GTK+ documentation states that all GDK and GTK+ calls should be made from the main thread.
Fixes https://github.com/libsdl-org/SDL/issues/11984
2025-01-19 18:53:55 -08:00
Sam Lantinga
dfdc120268
tray: document thread-safety
2025-01-19 18:53:55 -08:00