Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from libsdl-org:main #35

Open
wants to merge 10,000 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
a0b6c0f
x11: Don't wait for events when the connection errored out (#8392)
Guldoman Feb 8, 2025
69d2802
Fix for 500ms hang after user clicks on the title bar, but before mov…
ClintKilmer Feb 8, 2025
ca9a044
Memory Leak in WIN_CreateHCursor When CreateColorBitmap Fails
thouravi Feb 9, 2025
e29ebb9
Update geometry renderer example
cfwalter Feb 9, 2025
7aba6c4
Proper Resource Cleanup in WIN_UpdateWindowShape
thouravi Feb 9, 2025
78721d7
joystick: Fix PS5 player LED hint change callback name
stenzek Feb 10, 2025
9bd6d36
Added SDL_DEPS_SHARED option to control default dynamic loading of sh…
RubisetCie Feb 10, 2025
d35bef6
pipewire: Ensure that the correct struct is used for enumeration APIs
Conan-Kudo Feb 10, 2025
f6126e9
Centered joystick axis values should be 0
slouken Feb 10, 2025
4fd0b2a
Fix #12142 - the problem was if the size of the vertex buffer was exc…
danginsburg Feb 10, 2025
ecd089b
Don't return short waits from SDL_IOReady()
slouken Feb 10, 2025
bf01cc8
Renamed "Dreamcast Controller Usb" to "DreamPort"
kosekmi Feb 10, 2025
da464e9
win32: Keep the window on the last maximized display when leaving ful…
Kontrabant Feb 10, 2025
0bc1f87
Added SDL_PROP_SURFACE_HOTSPOT_X_NUMBER and SDL_PROP_SURFACE_HOTSPOT_…
slouken Feb 10, 2025
b63d3af
Sync SDL3 wiki -> header
SDLWikiBot Feb 10, 2025
c032586
wayland: Scale-to-display mode requires both viewports and xdg-output…
Kontrabant Feb 10, 2025
3bc53b9
wayland: Don't set libdecor frame visibility before the first commit
Kontrabant Feb 10, 2025
84b0c13
Added support for Motion JPEG camera capture
slouken Feb 7, 2025
5e31bbf
Remove functions not used when STBI_NO_PNG and STBI_NO_HDR are defined
slouken Feb 10, 2025
9308404
Removed functions not used by SDL
slouken Feb 10, 2025
cf41ccc
Removed stb_image.h from SDL
slouken Feb 11, 2025
5ccee77
testcamera: added support for Motion JPEG camera frames
slouken Feb 11, 2025
3cfa476
Added support for SDL_PIXELFORMAT_ABGR8888 textures
slouken Feb 11, 2025
0bce19c
The 10-bit texture formats have alpha on Direct3D
slouken Feb 11, 2025
9b18e84
[GPU] D3D12 backend debug markers were being cut
Arcnor Feb 11, 2025
6c37971
Removed the mapping for the Sanwa Supply JY-P76USV
slouken Feb 11, 2025
99cf162
Fixed the name of SDL_SYSWMEVENT
slouken Feb 11, 2025
78f816d
x11: Apply the modifier state from key events
Kontrabant Feb 11, 2025
5dd2492
updated the snake demo to be C++ compatible
captain0xff Feb 11, 2025
b03332b
updated bytepusher demo to be C++ compatible
captain0xff Feb 11, 2025
e602940
Check for non-NULL icon for trays on Unix
Feb 10, 2025
55fd205
Add missing integer texture formats to SDL_GPUTextureFormatTexelBlock…
coffeechriph Feb 11, 2025
ce69e98
Copy SDL2_SYSWMEVENT data into temporary memory for the event
slouken Feb 11, 2025
715c187
Added an internal hint "SDL_VIDEO_X11_XINPUT2" for sdl2-compat
slouken Feb 11, 2025
706de78
audio/video: Skip preferred drivers when loading a driver on demand
Kontrabant Feb 11, 2025
1b35ca9
Refactored GameInput initialization
slouken Feb 12, 2025
f67c644
Fixed reporting hat positions for GameInput controllers
slouken Feb 12, 2025
ca29304
Fixed continually resetting keyboard and mouse readings
slouken Feb 12, 2025
d2b7a84
Fixed SDL_GetNumGamepadTouchpads() returning 1 for a NULL gamepad
slouken Feb 12, 2025
1354aff
haiku: Fixed keyboard input.
icculus Feb 12, 2025
3be67ce
Fix GTK tray icon without menu + lifetime
Feb 12, 2025
041894a
Sync SDL3 wiki -> header
SDLWikiBot Feb 13, 2025
b9d018f
Fixed wayland cursor use-after-free at shutdown
slouken Feb 13, 2025
3de9758
Document the "trace" log priority
slouken Feb 13, 2025
cedf53b
Sync SDL3 wiki -> header
SDLWikiBot Feb 13, 2025
5dce8c7
SDL_GetRelativeMouseState(): Get relative mouse position also when re…
Sackzement Feb 13, 2025
ed0a03e
Fixed Cursor Icon State for SYSTEM_CURSOR_PROGRESS
thouravi Feb 13, 2025
c16b7bc
SDL_Get*Driver() functions: Set error message on failure
Sackzement Feb 13, 2025
8a648df
emscripten: Fixed unregistering of key event handlers
DutChen18 Feb 14, 2025
5b98c4a
Fixed motion events with TOOL_TYPE_UNKNOWN
slouken Feb 14, 2025
6f3b14a
audio/video: Fix uninitialized field warnings
Kontrabant Feb 14, 2025
fd4e6d2
Don't render 0 sized texture rectangles
slouken Feb 15, 2025
ba45256
Sync SDL3 wiki -> header
SDLWikiBot Feb 15, 2025
4a9b579
joystick: remove dead udev code
cgutman Feb 15, 2025
84a236c
hashtable: Redesign the hashtable API.
icculus Feb 13, 2025
c6a3b5b
src/test/SDL_test_harness.c: Free variables before returning
Sackzement Feb 16, 2025
831fc70
test/testautomation_intrinsics.c: Free variables before returning
Sackzement Feb 16, 2025
e3d9f11
Remove the reference to the thread when it is detached
slouken Feb 16, 2025
1754943
Fixed camera frame acquisition on Windows 7
slouken Feb 16, 2025
dea99e5
Sync SDL3 wiki -> header
SDLWikiBot Feb 16, 2025
06eb10c
haiku: check if the returned _SDL_GLView is null or not
captain0xff Feb 16, 2025
7ea0ffb
update
captain0xff Feb 16, 2025
da2460f
test/testautomation_audio.c: Free variables before returning
Sackzement Feb 16, 2025
045a449
test/testaudio.c: Fix use-after-free warning
Sackzement Feb 17, 2025
a513168
Fixed Memory/Resource Leaks (#12304)
thouravi Feb 17, 2025
de12cb9
Fixed crash at shutdown with new hashtable code
slouken Feb 17, 2025
6ef687c
Simplified and fixed media foundation buffer handling
slouken Feb 17, 2025
fadb261
wayland: Add color manager protocol support
Kontrabant Oct 12, 2024
3b4cfc1
wayland: Update copyright dates in added color manager source files
Kontrabant Feb 17, 2025
6aef6ae
AddPulseAudioDevice(): Fix use-after-free
Sackzement Feb 17, 2025
70d23b2
README-migration: Remove errant reference to SDL_FALSE_
cgutman Feb 17, 2025
5c79f4c
Incorrect bfOffBits Calculation in WIN_ConvertDIBtoBMP
thouravi Feb 17, 2025
057c360
Removing Double-free Issue
thouravi Feb 17, 2025
31f9cb4
Unchecked Return Value in WIN_SuspendScreenSaver (#12316)
thouravi Feb 17, 2025
1fd6269
Renamed DreamPort to DreamPicoPort
kosekmi Feb 18, 2025
a7f01cd
x11: Set the pending window position immediately after mapping
Kontrabant Feb 17, 2025
7500a75
Remove usages of `restrict` keyword in SDL_render.c
nightmareci Feb 18, 2025
9e4c657
wayland: Fix color manager protocol string check
Kontrabant Feb 19, 2025
523e653
SDL_test: fix "'function': different 'const' qualifiers" warning in S…
madebr Feb 19, 2025
a40b2de
Fix SDL_emscriptenaudio.c under wasm64
sbc100 Feb 18, 2025
1a85397
thread/windows: fix stack overflow in exception naming
mrpapersonic Feb 18, 2025
8f4c5e1
Finish any drawing when destroying a software renderer
slouken Feb 20, 2025
1a38960
Call SDL_DiscardAllCommands() for the software renderer as well
slouken Feb 20, 2025
6e0264d
x11: Use the current or last-requested window position when setting t…
Kontrabant Feb 19, 2025
b48de48
wayland: Add support for high-DPI icons
Kontrabant Feb 19, 2025
9784414
cmake: build SDL_uclibc with -fPIC
madebr Feb 20, 2025
fdf8e5a
ci: build static loongarch libraries with -fPIC
madebr Feb 20, 2025
baf69ed
Revert "cmake: build SDL_uclibc with -fPIC"
madebr Feb 20, 2025
a792434
Added initial MJPG support using stb_image
slouken Feb 20, 2025
06602f4
Document that the pitch is the length of the image data for SDL_PIXEL…
slouken Feb 20, 2025
2e89c53
Added support for decoding MJPG into NV12 textures
slouken Feb 20, 2025
f24f9d3
Revert "testcamera: added support for Motion JPEG camera frames"
slouken Feb 20, 2025
9267930
Added a fast path for converting the same format and pitch
slouken Feb 20, 2025
52ee0c1
Sync SDL3 wiki -> header
SDLWikiBot Feb 20, 2025
c153f83
ci: enable ccache
madebr Feb 20, 2025
8d3db06
ci: GitHub is retiring Ubuntu 20.04 support
madebr Feb 21, 2025
28f0867
SPA_FALLTHROUGH expands to nothing when using the Intel compiler
madebr Feb 21, 2025
71d1de5
ci: add cppflags to CMAKE_(C|CXX)_FLAGS
madebr Feb 21, 2025
7855842
ci: disable precompiled headers for classic intel compiler
madebr Feb 21, 2025
3293eb1
use hidapi to get mouse/keyboard string
expikr Feb 18, 2025
5d776c0
Refactored SDL_CreateJoystickName() into a general SDL_CreateDeviceNa…
slouken Feb 21, 2025
2e346d7
Added 32-bit texture formats to Texture_GetBlockWidth() and Texture_G…
slouken Feb 21, 2025
c70f54e
Remove redundant casts
Sackzement Feb 21, 2025
69e0309
fallback to defining SDL_TriggerBreakpoint as __builtin_trap in older…
TTimo Feb 21, 2025
2a1b617
Update include/SDL3/SDL_assert.h
TTimo Feb 21, 2025
fa380a4
Update include/SDL3/SDL_assert.h
TTimo Feb 21, 2025
9d06145
ci: fix type + names of intel compiler artifacts
madebr Feb 21, 2025
9a607e8
make start&length represent utf32 indices
williamhCode Feb 21, 2025
3b8cb62
Make it easier to enable IME debug logs
slouken Feb 21, 2025
911e53d
Retain mouse focus as long as we're getting mouse events
slouken Feb 21, 2025
b5297de
Add 'const' to pointer parameters
Sackzement Feb 21, 2025
fcd41c1
Check desired window area when checking zoom state
slouken Feb 22, 2025
03e00cd
v4l2: map SDL_PIXELFORMAT_MJPG to V4L2_PIX_FMT_MJPEG
madebr Feb 22, 2025
5c214e5
testcamera: SDL_AppQuit destroys state and SDL
madebr Feb 22, 2025
75bbcbf
Added support for Motion JPEG pipewire camera capture
slouken Feb 22, 2025
bc85c55
testcontroller: create window with high pixel density
slouken Feb 22, 2025
a811e0e
Added support for the 8BitDo Micro gamepad
slouken Feb 22, 2025
fdf72d1
Use the keyboard/mouse vendor if available
slouken Feb 22, 2025
1ddba3a
Replace "8BitDo Tech Ltd" with "8BitDo" in the manufacturer string
slouken Feb 22, 2025
e50db69
Disable all camera drivers if SDL_CAMERA_DISABLED is defined
slouken Feb 22, 2025
70f657e
ci: farewell, clang32 on msys2
madebr Feb 22, 2025
945da09
pipewire: Fix possible deadlock when opening a device
cgutman Feb 22, 2025
7224b40
Fix errors when building stb_image with -DSDL_LIBC=OFF
slouken Feb 22, 2025
52e64f8
Use SDL C runtime functions in OpenVR driver
slouken Feb 22, 2025
1a0a94b
x11: Accommodate the borders when setting the initial window position
Kontrabant Feb 22, 2025
52af81e
wayland: Fix mapping borderless windows under libdecor
Kontrabant Feb 23, 2025
8bfde67
Remove unnecessary fcitx's devel package dependency in linux doc
wengxt Feb 23, 2025
ad11c69
src/io/SDL_asyncio.c:SDL_AsyncIOFromFile(): Fix null-dereference warning
Sackzement Feb 23, 2025
ea77472
Document/ignore GPU features without universal support
TheSpydog Feb 23, 2025
0815637
vulkan build fix
TheSpydog Feb 23, 2025
deadfe0
Sync SDL3 wiki -> header
SDLWikiBot Feb 23, 2025
35544df
Changed PULSEAUDIO_FlushRecording() to only flush audio present when …
petterreinholdtsen Feb 24, 2025
a0086a5
Add missing scancode names
seragh Feb 23, 2025
2990d14
Map additonal Linux keycodes to SDL scancodes
seragh Feb 23, 2025
60b7faa
gpu: Validate that reserved struct members are unset
TheSpydog Feb 24, 2025
a7bc6c5
gpu: initialize VkDebugUtilsLabelEXT::color
Feb 24, 2025
db817a3
gpu: Fix forward declaration and inclusion of PrivateGPUDriver
flibitijibibo Feb 24, 2025
58388e8
Add SDL_HINT_JOYSTICK_HAPTIC_AXES
Lawstorant Feb 20, 2025
0a592b7
Sync SDL3 wiki -> header
SDLWikiBot Feb 24, 2025
db4e6c1
Cocoa metal layers need their size updated before renderer updates
slouken Feb 24, 2025
e6a24fc
fix stbi__parse_png_file() reading too much bytes (thanks @miniupnp!)
slouken Feb 25, 2025
6980325
Added support for the "%n" sscanf format specifier
slouken Feb 25, 2025
bb8dcf0
Sync SDL3 wiki -> header
SDLWikiBot Feb 25, 2025
ad840e8
Better document that main functionality is in SDL_main.h
slouken Feb 25, 2025
fc365e9
Sync SDL3 wiki -> header
SDLWikiBot Feb 25, 2025
ac5fca4
Clarify the expected usage of SDL_StorageReady()
slouken Feb 25, 2025
ffdca34
Sync SDL3 wiki -> header
SDLWikiBot Feb 25, 2025
1c2189c
strings.h isn't available in Windows environments
slouken Feb 25, 2025
44f1ec3
GPU: Make Vulkan transfer buffers dedicated allocs
thatcosmonaut Feb 10, 2025
2f77558
fix comment
thatcosmonaut Feb 10, 2025
29df99e
Clarified SDL_RenderReadPixels() documentation
slouken Feb 25, 2025
85a3025
Set an error message if the rect passed to SDL_RenderReadPixels() is …
slouken Feb 25, 2025
38a73a1
Sync SDL3 wiki -> header
SDLWikiBot Feb 25, 2025
bb748ef
Don't cleanup clipboard in SDL_SendClipboardUpdate on Wayland
hwsmm Feb 25, 2025
f0f593f
Embed a description about Wayland clipboard instead of a link
hwsmm Feb 25, 2025
049a7a0
Wake the main thread for main function dispatch
slouken Feb 25, 2025
34c3734
Fixed opening one Joy-Con when the other is visible but disconnected
slouken Feb 26, 2025
e012573
Don't fixup mappings for Joy-Con controllers
slouken Feb 26, 2025
cf819ca
Don't allow further operations on properties while we're destroying them
slouken Feb 26, 2025
9464aaa
Change D3D12 GPU backend to respect has_depth_stencil_target
jsoulier Feb 26, 2025
fab52b5
wayland: Ensure that color descriptions are always retrieved
Kontrabant Feb 26, 2025
66ecdc6
Don't update the report mode until the related hint is set
slouken Feb 26, 2025
ba88b6a
Fixed reliability of initializing Switch controllers on macOS
slouken Feb 26, 2025
cc984c9
Added a mapping for the 8BitDo SN30 Pro+ controller on macOS
slouken Feb 26, 2025
56e2955
Sync SDL3 wiki -> header
SDLWikiBot Feb 26, 2025
1ea99bc
Early out if setting a duplicate window title
slouken Feb 27, 2025
eb89d0c
Don't put wired Switch Pro controllers into simple report mode
slouken Feb 27, 2025
2b784b5
Fix SDL_GlobDirectory
alexbatalov Feb 27, 2025
b3336c5
Match style
alexbatalov Feb 27, 2025
f7cadcb
examples: Use SDL_GetAudioStreamQueued, not SDL_GetAudioStreamAvailable.
icculus Feb 27, 2025
7b9036b
wayland: Don't overwrite clipboard data with the primary selection text
Kontrabant Feb 27, 2025
edaf447
tests: Add showing/setting the primary selection text to testclipboard
Kontrabant Feb 27, 2025
d09bf56
clipboard: Cleanup coding style
Kontrabant Feb 27, 2025
281f0fa
Include the VID/PID of generic keyboard/mouse devices on Windows
slouken Feb 26, 2025
35e8cf8
render: allow render targets to use logical presentation.
icculus Feb 27, 2025
54c7aa9
Sync SDL3 wiki -> header
SDLWikiBot Feb 28, 2025
9a80279
SDL_pen: fix eraser check
wtay Feb 12, 2025
a441075
sysjoystick: don't leak fd on error
wtay Feb 12, 2025
87b1c97
Fix pen generated mouse events not having SDL_PEN_MOUSEID (#12392)
Elbagast Feb 28, 2025
ea513fd
Fixed vulkan gpu backend android orientation behaviour to just work l…
guitarfreak Feb 28, 2025
c682599
GPU_d3d12: Switched the default swapchain scaling mode to none.
guitarfreak Feb 28, 2025
ef23ebf
Fixed the cursor clip rect when toggling window borders on macOS
slouken Feb 28, 2025
725af6a
camera: Fixed surface formats, etc, for Emscripten backend.
icculus Feb 28, 2025
7ab1412
Sync SDL3 wiki -> header
SDLWikiBot Feb 28, 2025
b8c2bc1
Added build dependencies for Arch Linux
slouken Mar 1, 2025
60c65f9
SDL_camera.c: fix failure-return in SDL_PrepareCameraSurfaces().
sezero Mar 1, 2025
6e4193b
Note that the file names are UTF-8 encoded
slouken Mar 1, 2025
ee5f5c9
Sync SDL3 wiki -> header
SDLWikiBot Mar 1, 2025
8a7beca
camera: clear the spec when closing, so re-opening can probe again
madebr Mar 1, 2025
cbdc93b
cmake: make sure a SDL3 library is present when not using COMPONENTs
madebr Mar 1, 2025
f868408
Ceil the audio resampling rate to avoid over-estimating output samples.
0x1F9F1 Mar 1, 2025
a881057
camera: Delete some failure code that should have been removed before.
icculus Mar 1, 2025
b836ad4
Fix a root signature mismatch for the D3D12 renderer
slouken Mar 1, 2025
020664b
Update mouse button state when re-entering a window
slouken Mar 1, 2025
55484ef
Moved WIN_UpdateMouseCapture() to be with the other mouse functions
slouken Mar 1, 2025
f0cb78e
Handle XCreateIC() failing when composition UI is enabled
slouken Mar 1, 2025
292e431
Updated to version 3.2.6 for release
slouken Mar 2, 2025
6586419
Added testpen to the Xcode test project
slouken Mar 2, 2025
b0df1cb
Updated to version 3.3.0 for development
slouken Mar 2, 2025
078d737
cocoa: Run pending events to completion
Kontrabant Feb 12, 2025
b69201d
cocoa: Don't overwrite the desktop mode when changing the fullscreen …
Kontrabant Mar 2, 2025
b0d2a4f
gpu: Fix Z offset for D3D12 realigned 3D texture uploads
TheSpydog Mar 2, 2025
44bca81
Change default texture scale mode per renderer
Oen44 Jan 25, 2025
954675b
Sync SDL3 wiki -> header
SDLWikiBot Mar 2, 2025
e25ee22
Added tiled 9-grid texture rendering function
Oen44 Jan 24, 2025
67127af
Fix from #12118
Oen44 Feb 2, 2025
428f0dc
add SDL_SetRelativeMouseTransform
expikr Feb 21, 2025
5373271
forbid transform change while relative mode active
expikr Feb 26, 2025
2c46c3d
Updated dynamic API for new functions
slouken Mar 2, 2025
1a7c206
Save and restore error messages when rolling back after failed init
slouken Mar 2, 2025
2a02234
Sync SDL3 wiki -> header
SDLWikiBot Mar 2, 2025
c3b4156
Sync SDL3 wiki -> header
SDLWikiBot Mar 2, 2025
16f12c0
Implement the XDP Camera portal
Aug 29, 2024
eac63b4
Add the definition for DBUS_TYPE_UNIX_FD to SDL_dbus.h
Aug 29, 2024
ca3c5fd
fix build: s/SDL_DetectSandbox/SDL_GetSandbox/
sezero Mar 2, 2025
2c7c3d4
Only use VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR on Android
slouken Mar 2, 2025
113eb6f
gpu: Add BC2_RGBA_UNORM_SRGB to GetBlockWidth/Height functions
TheSpydog Mar 3, 2025
d57aa6f
pipewire: Don't require pw_check_library_version() with Pipewire < 0.…
smcv Mar 3, 2025
24ec2ed
Don't save temporary mode changes to the desktop mode
slouken Mar 2, 2025
6c347cb
video: Handle Cocoa desktop mode switch inhibition in the video layer
Kontrabant Mar 3, 2025
0ccf272
Check the display device before dereferencing
Kontrabant Mar 3, 2025
3b9f0df
Use _this pointer to reference the video device
Kontrabant Mar 3, 2025
7c29c8b
Added fullscreen_active to better track fullscreen state
slouken Mar 4, 2025
7df0ffd
Sync SDL3 wiki -> header
SDLWikiBot Mar 4, 2025
4bb46e9
Fixed clip rect when logical presentation is enabled
slouken Mar 4, 2025
debbe1c
Fix for Message Box failing to init on X11 (#12455)
Volian0 Mar 4, 2025
5d20bbf
Presenting while drawing to a render target should fail.
slouken Mar 4, 2025
e7abbf1
x11: Synthesize fullscreen size events on Openbox
Kontrabant Mar 4, 2025
9f9a442
video: Synthesize fullscreen related moves if the driver does not.
Kontrabant Mar 4, 2025
82552e5
Make SDL_RegisterEvents() thread-safe
slouken Mar 4, 2025
5f07347
Fixed crash unplugging a HIDAPI controller
slouken Mar 4, 2025
80ae3a7
Fixed crash when restoring the desktop mode on macOS
slouken Mar 4, 2025
0c8ddc1
Ignore BadRROutput errors from XRRGetOutputInfo()
slouken Mar 5, 2025
ca9bc6b
Revert "Ignore BadRROutput errors from XRRGetOutputInfo()"
slouken Mar 5, 2025
e9632c8
Handle XWayland not sending display disconnected events
slouken Mar 5, 2025
aef240b
Fixed continuous logging if returning to desktop mode fails on X11
slouken Mar 5, 2025
8f40dad
Document the thread safety of SDL surface functions
slouken Mar 5, 2025
9f55794
Sync SDL3 wiki -> header
SDLWikiBot Mar 5, 2025
fe9bdcf
Added SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT
slouken Mar 5, 2025
f01bcae
Sync SDL3 wiki -> header
SDLWikiBot Mar 5, 2025
fae324d
Update XSync code to match SDL3 conventions
slouken Mar 5, 2025
794ff28
Added support for using XTest to warp the mouse
slouken Mar 5, 2025
49af576
Disable XTest by default
slouken Mar 5, 2025
bdde074
Sync SDL3 wiki -> header
SDLWikiBot Mar 5, 2025
6e2d3c9
x11: Enable legacy synchronization for external window resize and mov…
Kontrabant Mar 5, 2025
cb099eb
Make texture scale mode a part of the 2D renderer draw state
slouken Mar 6, 2025
4c82b58
Added support for SDL_PIXELFORMAT_MJPG to SDL_DuplicateSurface()
slouken Mar 6, 2025
e20e27e
Added SIMD blitters for 8888 -> 8888 format conversion
slouken Mar 6, 2025
c4be7f7
wayland: Add additional MIME types for text drag & drop
Kontrabant Mar 6, 2025
9c7c11f
wayland: Roundtrip when receiving data offers
Kontrabant Mar 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
91 changes: 91 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
AlignConsecutiveMacros: Consecutive
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true

AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false

AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine

# Custom brace breaking
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeElse: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true

# Make the closing brace of container literals go to a new line
Cpp11BracedListStyle: false

# Never format includes
IncludeBlocks: Preserve
# clang-format version 4.0 through 12.0:
#SortIncludes: false
# clang-format version 13.0+:
#SortIncludes: Never

# No length limit, in case it breaks macros, you can
# disable it with /* clang-format off/on */ comments
ColumnLimit: 0

IndentWidth: 4
ContinuationIndentWidth: 4
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: NoIndent

PointerAlignment: Right
SpaceAfterCStyleCast: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false

UseCRLF: false
UseTab: Never

ForEachMacros:
[
"spa_list_for_each",
"spa_list_for_each_safe",
"wl_list_for_each",
"wl_list_for_each_safe",
"wl_array_for_each",
"udev_list_entry_foreach",
]

---

59 changes: 59 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
Checks: >
-*,
bugprone-assert-side-effect,
bugprone-assignment-in-if-condition,
bugprone-bool-pointer-implicit-conversion,
bugprone-dangling-handle,
bugprone-dynamic-static-initializers,
bugprone-infinite-loop,
bugprone-integer-division,
bugprone-macro-repeated-side-effects,
bugprone-misplaced-operator-in-strlen-in-alloc,
bugprone-misplaced-pointer-arithmetic-in-alloc,
bugprone-misplaced-widening-cast,
bugprone-not-null-terminated-result,
bugprone-posix-return,
bugprone-redundant-branch-condition,
bugprone-string-literal-with-embedded-nul,
bugprone-suspicious-memset-usage,
bugprone-suspicious-semicolon,
bugprone-suspicious-string-compare,
bugprone-too-small-loop-variable,
bugprone-unused-return-value,
cert-err33-c,
clang-analyzer-core.*,
clang-analyzer-valist.*,
clang-analyzer-unix.Malloc,
clang-diagnostic-*,
google-readability-casting,
misc-misleading-bidirectional,
misc-misleading-identifier,
misc-misplaced-const,
misc-redundant-expression,
objc-*,
performance-type-promotion-in-math-fn,
readability-avoid-const-params-in-decls,
readability-braces-around-statements,
readability-const-return-type,
readability-duplicate-include,
readability-inconsistent-declaration-parameter-name,
readability-misplaced-array-index,
readability-non-const-parameter,
readability-redundant-control-flow,
readability-redundant-declaration,
readability-redundant-function-ptr-dereference,
readability-redundant-preprocessor,
readability-simplify-boolean-expr

CheckOptions:
- key: bugprone-assert-side-effect.AssertMacros
value: "SDL_assert, SDL_assert_release, SDL_assert_paranoid, SDL_assert_always, SDL_COMPILE_TIME_ASSERT"
- key: bugprone-misplaced-widening-cast.CheckImplicitCasts
value: true
- key: bugprone-not-null-terminated-result.WantToUseSafeFunctions
value: false # Do not recommend _s functions

FormatStyle: "file"
HeaderFilterRegex: "*.h$"
WarningsAsErrors: ""
69 changes: 69 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# For format see editorconfig.org
# Copyright 2022 Collabora Ltd.
# SPDX-License-Identifier: Zlib

root = true

[*.{c,cc,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}]
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}]
indent_size = 2
indent_style = space
trim_tailing_whitespace = true

[*.xml]
indent_size = 4
indent_style = space

[{CMakeLists.txt,cmake/*.cmake}]
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{cmake/cmake_uninstall.cmake.in,test/CMakeLists.txt,cmake/SDL3Config.cmake.in}]
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{Makefile.*,*.mk,*.sln,*.pbxproj,*.plist}]
indent_size = 8
indent_style = tab
tab_width = 8

[src/joystick/controller_type.*]
indent_style = tab

[src/joystick/hidapi/steam/*.h]
indent_style = tab

[src/libm/*.c]
indent_style = tab

[src/test/SDL_test_{crc32,md5,random}.c]
indent_size = 2
indent_style = space

[src/video/yuv2rgb/*.{c,h}]
indent_style = tab

[wayland-protocols/*.xml]
indent_size = 2
indent_style = space

[*.{markdown,md}]
indent_size = 4
indent_style = space
# Markdown syntax treats tabs as 4 spaces
tab_width = 4

[{*.bat,*.rc}]
end_of_line = crlf

[*.cocci]
insert_final_newline = true
82 changes: 82 additions & 0 deletions .github/actions/setup-gdk-desktop/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: 'Setup GDK (Game Development Kit) for Windows Desktop'
description: 'Download GDK and install into MSBuild'
inputs:
# Keep edition and ref in sync!
edition:
description: 'GDK edition'
default: '240601' # YYMMUU (Year Month Update)
ref:
description: 'Git reference'
default: 'June_2024_Update_1'
folder:
description: 'Folder where to create Directory.Build.props'
required: true
default: '${{ github.workspace }}'
runs:
using: 'composite'
steps:
- uses: actions/setup-python@main
with:
python-version: 3.x
- name: 'Calculate variables'
id: calc
shell: pwsh
run: |
$vs_folder=@(vswhere -latest -property installationPath)
echo "vs-folder=${vs_folder}" >> $Env:GITHUB_OUTPUT

echo "gdk-path=${{ runner.temp }}\GDK-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT

echo "cache-key=gdk-${{ inputs.ref }}-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT
- name: 'Restore cached GDK'
id: cache-restore
uses: actions/cache/restore@v4
with:
path: '${{ steps.calc.outputs.gdk-path }}'
key: ${{ steps.calc.outputs.cache-key }}
- name: 'Download GDK'
if: ${{ !steps.cache-restore.outputs.cache-hit }}
shell: pwsh
run: |
python build-scripts/setup-gdk-desktop.py `
--download `
--temp-folder "${{ runner.temp }}" `
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
--no-user-props
- name: 'Extract GDK'
if: ${{ !steps.cache-restore.outputs.cache-hit }}
shell: pwsh
run: |
python build-scripts/setup-gdk-desktop.py `
--extract `
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
--temp-folder "${{ runner.temp }}" `
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
--no-user-props
- name: 'Cache GDK'
if: ${{ !steps.cache-restore.outputs.cache-hit }}
uses: actions/cache/save@v4
with:
path: '${{ steps.calc.outputs.gdk-path }}'
key: ${{ steps.calc.outputs.cache-key }}
- name: 'Copy MSBuild files into GDK'
shell: pwsh
run: |
python build-scripts/setup-gdk-desktop.py `
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
--copy-msbuild `
--no-user-props
- name: 'Write user props'
shell: pwsh
run: |
python build-scripts/setup-gdk-desktop.py `
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" `
--temp-folder "${{ runner.temp }}" `
--vs-folder="${{ steps.calc.outputs.vs-folder }}" `
--gdk-path="${{ steps.calc.outputs.gdk-path }}" `
"--props-folder=${{ inputs.folder }}"
53 changes: 53 additions & 0 deletions .github/actions/setup-loongarch64-toolchain/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'Setup LoongArch64 toolchain'
description: 'Download Linux LoongArch64 toolchain and set output variables'
inputs:
version:
description: 'LoongArch64 version'
default: '2023.08.08'
outputs:
prefix:
description: "LoongArch toolchain prefix"
value: ${{ steps.final.outputs.prefix }}
cc:
description: "LoongArch C compiler"
value: ${{ steps.final.outputs.cc }}
cxx:
description: "LoongArch C++ compiler"
value: ${{ steps.final.outputs.cxx }}
runs:
using: 'composite'
steps:
- uses: actions/cache/restore@v4
id: restore-cache
with:
path: /opt/cross-tools
key: loongarch64-${{ inputs.version }}

- name: 'Download LoongArch64 gcc+glibc toolchain'
if: ${{ !steps.restore-cache.outputs.cache-hit }}
shell: bash
run: |
url="https://github.com/loongson/build-tools/releases/download/${{ inputs.version }}/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz"
wget "$url" -O /tmp/toolchain.tar.xz
mkdir -p /opt
tar -C /opt -x -f /tmp/toolchain.tar.xz
- uses: actions/cache/save@v4
if: ${{ !steps.restore-cache.outputs.cache-hit }}
with:
path: /opt/cross-tools
key: loongarch64-${{ inputs.version }}
- name: 'Set output vars'
id: final
shell: bash
run: |
prefix=/opt/cross-tools
echo "prefix=${prefix}" >> $GITHUB_OUTPUT
cc="${prefix}/bin/loongarch64-unknown-linux-gnu-gcc"
cxx="${prefix}/bin/loongarch64-unknown-linux-gnu-g++"
echo "cc=${cc}" >> $GITHUB_OUTPUT
echo "cxx=${cxx}" >> $GITHUB_OUTPUT
echo "LOONGARCH64_CC=${cc}" >>$GITHUB_ENV
echo "LOONGARCH64_CXX=${cxx}" >>$GITHUB_ENV
Loading