Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2891 commits
Select commit Hold shift + click to select a range
7391cd3
XInput: Use XInputGetCapabilitiesEx instead of fragile GuessXInputDevice
DJm00n Dec 15, 2023
2aadef0
Pass through the name of the controller for the XInput mapping
slouken Dec 17, 2023
5773c34
test/watcom.mif: disable W201 warning for testautomation_stdlib.c.
sezero Dec 17, 2023
91f8b4d
Added a controller name for the Steam virtual gamepad
slouken Dec 17, 2023
3ac69c6
test/watcom.mif: remove a stale rule.
sezero Dec 17, 2023
5240071
Sync more Steam Controller header definitions for the Steam Deck
endrift Dec 20, 2023
9720672
Fix compilation / same as sdl2-compat
1bsyl Dec 20, 2023
7bb0e83
Added Steam Input API support for game controllers
slouken Dec 10, 2023
2fecefc
Updated Xcode project with Steam Deck controller driver
slouken Dec 20, 2023
d76097d
fix os/2 and watcom builds after commit 7bb0e839a65
sezero Dec 20, 2023
919cd56
Use the original manufacturer and product strings for the joystick CRC
slouken Dec 21, 2023
eba591a
Fixed Xcode project
slouken Dec 21, 2023
ca26cde
SDL_config_os2.h: enable SDL_JOYSTICK_VIRTUAL
sezero Dec 21, 2023
39a0013
Makefile.os2: -DSDL_USE_LIBICONV to fix linkage for GNU libiconv option
sezero Dec 21, 2023
e7c4575
Use crc16 return value when calculating GUID
FrogTheFrog Dec 21, 2023
3a8032f
Make sure the string is terminated, fixed invalid read in SDL_Private…
1bsyl Dec 23, 2023
557d8e2
PS2 use WaitSemaEx for waiting for semaphore with timeout
uyjulian Dec 24, 2023
884c21c
Use common generic syscond for platforms with no cond implementation
uyjulian Dec 24, 2023
fe76c40
Added a runtime check for BLUETOOTH_CONNECT in addition to BLUETOOTH …
slouken Dec 24, 2023
aeda6a8
Record the initial input report mode and only restore simple mode if …
slouken Dec 24, 2023
49eb375
Added SDL2.framework to the embedded frameworks for SDL test programs
slouken Dec 24, 2023
857e5b0
Fixed trying to add a game controller mapping for the accelerometer o…
slouken Dec 24, 2023
3b1e0e1
Try SDL_UDEV_deviceclass to detect joysticks even if in a container
twhitehead Nov 29, 2023
2afbb57
Add Access Controller
offalynne Dec 26, 2023
5dfb0c1
Fix static build with libdrm 2.4.116
ReillyBrogan Dec 26, 2023
8030e75
Fix static build with libdecor 0.2.0
ReillyBrogan Dec 26, 2023
0f8f4f6
Sync SDL3 wiki -> header
SDLWikiBot Dec 27, 2023
b02c826
sdl2.m4: Call $PKG_CONFIG rather than hard-coding pkg-config
smcv Jan 1, 2024
4f8dd2d
Speed up processing of update-copyright.sh
slouken Jan 9, 2023
d649f95
Use GNU sed if available
slouken Feb 6, 2023
0fc3574
Updated copyright for 2024
slouken Jan 1, 2024
41bf6b5
Add basic rumble support to Steam Deck
endrift Dec 23, 2023
7b4f1ef
yuv2rgb: warning fixes and comment out unused code
sezero Jan 3, 2024
eb1b9b4
SDL_audio.c: Fix crash if we switch from direct output to streaming, …
Jan 4, 2024
b1ad45a
Fix memory barriers on ARMv5
neuschaefer Jan 5, 2024
674e894
Added mapping for the RX Gamepad, e.g. Pandora Box 7
slouken Jan 6, 2024
f892ae1
updateKeyboard should use the SDL window's screen instead of the view…
slouken Jan 6, 2024
be29ca0
Use the application requested size to determine automatic orientation…
slouken Dec 25, 2023
0e913a2
Renamed ShowTextInput/HideTextInput to ShowScreenKeyboard/HideScreenK…
slouken Jan 6, 2024
c309546
Fixed warning: no previous prototype for function 'SDL_GetGameControl…
slouken Jan 6, 2024
e1c3dcb
Don't try to send the PS third-party feature request to the Logitech …
slouken Jan 6, 2024
ca3b8fe
Fixed build
slouken Jan 6, 2024
8c4e4d5
Add hint to make SDL handle dbus_shutdown()
Jan 2, 2024
5e12e4b
Updated documentation for SDL_HINT_SHUTDOWN_DBUS_ON_QUIT
slouken Jan 7, 2024
d3c2166
gamepad: Clarify range and direction of axes
slouken Jan 8, 2024
64754f3
test: When listing test-cases, say which ones are disabled
smcv Jan 8, 2024
3ff56fd
testautomation: only require accelerated renderer with non-dummy vide…
madebr Aug 27, 2023
b1a82b5
gamecontroller: Fix function name in cherry-picked documentation
smcv Jan 8, 2024
4c11307
Only initialize audio drivers that have been requested
slouken Jan 8, 2024
f62d122
Restore the previously initialized subsystems after the Init/Quit test
slouken Jan 8, 2024
d1c5038
testautomation: don't do float equality tests
madebr Aug 27, 2023
69f3bb2
test: Accept small numerical differences in more mathematical tests
smcv Sep 28, 2023
2afd04d
test/acinclude.m4 (AM_PATH_SDL2): apply recent sdl2.m4 PKG_CONFIG patch
sezero Jan 9, 2024
bd2f1e9
Use the X11 driver if the application uses X11-based graphics frameworks
slouken Jan 9, 2024
970ed36
Only force X11 if SDL_VIDEO_DRIVER_X11 is available
slouken Jan 9, 2024
feaf52d
test: Fix encoding declaration for RGB24 test images
smcv Jan 10, 2024
1634a4c
test: Use SDL_CreateRGBSurfaceWithFormatFrom for SDLTest_ImageFace
smcv Jan 10, 2024
4f2c732
test: Use AUDIO_F32SYS for native-endianness
smcv Jan 10, 2024
71cd1fa
Fix compile error with XInputOnGameInput.h
TheSpydog Jan 10, 2024
9fe0995
wayland: Raise the frame throttle limit
Kontrabant Jan 10, 2024
01fa4dd
Fixed ASAN warning, runtime error: left shift of 160 by 24 places can…
1bsyl Jan 11, 2024
6620913
render: Fix line clipping with translated viewports
mardy Jan 11, 2024
347b6cd
Prevent ASAN warning:
1bsyl Jan 12, 2024
5db6eb7
Removed reference to deleted header from Xcode project
slouken Jan 13, 2024
b6e97d9
Fixed Xcode warnings
slouken Jan 13, 2024
bbe4d69
Use correct touch check flag
Susko3 Dec 26, 2023
38d11e5
Add missing `(void)` in functions params
Susko3 Dec 26, 2023
f641d91
Restore window minimum and maximum size if it is recreated
slouken Jan 16, 2024
eae81ec
Touchpads already have their right/left buttons swapped in raw input
slouken Jan 16, 2024
1e2f311
audio: backport SDL3's audio datatype converters.
icculus Jan 16, 2024
c69e858
audio: Patched to compile (mixed declarations and code).
icculus Jan 16, 2024
f3b0dc5
Fixed bug #8301 - Software renderer draws long lines incorrectly / SD…
1bsyl Jan 16, 2024
9db80ad
Fixed bug #7614: Segmentation Fault in SDL_BlitSurface
1bsyl Dec 11, 2023
f7f9478
docs: Note SDL_UpdateWindowSurfaceRects can update beyond specified a…
icculus Jan 16, 2024
3d6cf2b
update config.guess and config.sub from mainstream
sezero Jan 17, 2024
f52a12a
remove several instances of unnecessary emptry str "" after SDL_PRI???
sezero Jan 18, 2024
cc7fe8c
x11: XI_Motion should mark the global mouse position as changed.
icculus Jan 18, 2024
62d063f
testautomation_surface: Really make pitch + alignment overflow
smcv Jan 18, 2024
e807517
testautomation_surface: Really make width * bpp overflow
smcv Jan 18, 2024
0d97199
testautomation_surface: Make sure error is set by the function we expect
smcv Jan 18, 2024
472a415
video: move standard c, sse and lsx implementations of yuv2rgb to its…
madebr Jan 18, 2024
be576c5
Updated Xcode projects after https://github.com/libsdl-org/SDL/commit…
slouken Jan 19, 2024
11b111e
Fixed types used in documentation (thanks @Dragon-Baroque!)
slouken Jan 19, 2024
87b5bb5
Fixed potential overflow in software triangle rendering
slouken Jan 19, 2024
bb969ac
Fixed bug #7614: Segmentation Fault in SDL_BlitSurface (#7808)
1bsyl Jan 19, 2024
910e040
aaudio: Block the audio device thread when in the background.
icculus Jan 19, 2024
f7ab765
Fixed crash scaling very large surfaces
slouken Jan 19, 2024
109bb2f
Make sure the render target isn't bound as a resource
slouken Jan 19, 2024
1e13aa2
androidaudio: same fix as AAudio for pausing thread when backgroundin…
icculus Jan 20, 2024
b4f99de
Updated to version 2.29.1 for RC build
slouken Jan 20, 2024
cfc22ac
Added patch notes for the SDL 2.30.0 release
slouken Jan 20, 2024
5d6eb4a
Fixed overflow in SDL_SoftStretch() (see #8878)
1bsyl Jan 20, 2024
c3a3f18
updated WhatsNew.txt
sezero Jan 20, 2024
f1bc5f3
Prevent asan warning on qsort():
1bsyl Jan 20, 2024
83f3045
Revert "updated WhatsNew.txt"
slouken Jan 20, 2024
8eb2ec6
watcom makefiles: remove yuv_rgb_lsx.c from sources
sezero Jan 21, 2024
b5aec14
gdk: Backport SDL3 MR #8844
flibitijibibo Jan 21, 2024
e320327
Updated tests so they'll pass if we enable the C runtime in SDL2.dll
slouken Jan 21, 2024
3d5679b
Fix video_getSetWindowPosition() that fail when checking events,
1bsyl Mar 21, 2023
5368f45
Remove one test that contains call of SDL_Quit() / SDL_Init() because it
1bsyl Jan 7, 2023
811adaa
Only test error message when using specific video drivers
madebr Oct 13, 2023
880c693
testautomation_math: do relative comparison + more precise correct tr…
madebr Oct 14, 2023
fbee0b8
video: verify SDL_GetNumVideoDisplays is succesful
madebr Oct 14, 2023
69a6efc
Avoid using higher precision floating point numbers by using it in a …
madebr Oct 14, 2023
1737340
Use helper_ddtod function to compare atan2 infinity cases
madebr Oct 14, 2023
41fc398
Move check for SDL_Delay upper bounds to testtimer
madebr Aug 28, 2023
a420eb7
cmake: run testautomation with CTest on ci
madebr Sep 28, 2023
06dd70b
video: Use string comparison instead of #ifdefs for driver detection
Kontrabant Oct 15, 2023
f569cc5
tests: Fix automated audio tests on Windows and Linux
Kontrabant Oct 15, 2023
ed5d3d9
Fix compilation on loongarch
HecaiYuan Jan 21, 2024
237535b
Fixed bug #8897 - SDL_BlitSurface segfault when dest_rect is null
1bsyl Jan 22, 2024
4cb43db
test: Don't distinguish between different categories of tests
smcv Jan 22, 2024
55ba686
test: Run testautomation under Autotools too, not just CMake
smcv Jan 22, 2024
0f9422a
linux: Handle upower's UP_DEVICE_STATE_PENDING_CHARGE, PENDING_DISCHARGE
smcv Sep 20, 2023
61821bd
fix audio conversion from S16 to F32 using SSE2
pionere Jan 22, 2024
12bab1c
Fixed warning C4244: '=': conversion from 'Sint64' to 'int', possible…
slouken Jan 22, 2024
ef7261b
Updated to version 2.29.2 for RC build
slouken Jan 22, 2024
4845027
Updated to version 2.31.0 for development
slouken Jan 22, 2024
a8eeb18
wayland: Always create the backing input store, even if there is no seat
Kontrabant Jan 22, 2024
aaf426e
testhaptic.c: include stdlib.h for exit()
sezero Jan 22, 2024
1e016fd
aaudio: Set low-latency audio mode.
icculus Jan 22, 2024
c5c0b2c
SDL_ShowMessageBox: Remove `#ifdef`s and respect SDL_VIDEO_DRIVER hint.
icculus Jan 22, 2024
9e352e6
fixes after ShowMessageBox changes:
sezero Jan 23, 2024
48b62e2
make video/pandora to actually compile somehow.
sezero Jan 23, 2024
9196584
Fixed ambiguity between std::byte and byte in rpcndr.h
slouken Jan 23, 2024
0f5a815
Update to the latest version of the Khronos headers
slouken Jan 24, 2024
b16ef14
Make sure we include the matching copy of vk_video headers
slouken Jan 24, 2024
138fe3d
mayflash adapter PS4 support
mariotaku Jan 19, 2024
08caafe
Improved timing accuracy of SDL_WaitEventTimeout() on Windows
slouken Jan 25, 2024
7aab3f0
blendmode: Corrected docs for `SDL_BLENDOPERATION_[REV_]SUBTRACT`.
icculus Jan 25, 2024
1e06a36
wasapi: Clamp device->spec.samples to the hardware buffer size.
icculus Jan 26, 2024
f931b25
wasapi: If GetDeviceBuf can't get a full buffer, go back to waiting.
icculus Jan 27, 2024
4ff3b28
Enable text input on video initialization without popping up an on-sc…
slouken Jan 27, 2024
3322131
Fixed N3DS build
slouken Jan 27, 2024
5297596
Report out of memory instead of crashing in SDL_LoadFile_RW()
slouken Jan 27, 2024
230ae79
SDL_RWFromFile, stdio: reject if the file is not a regular file.
sezero Jan 27, 2024
fcd1c15
SDL_rwops.c (SDL_IsRegularFile): fix WinRT build failure due to S_ISREG
sezero Jan 27, 2024
2c11068
Document that the default log priority is error, not critical
slouken Jan 27, 2024
6ec3f5a
Simplified the default log category logic
slouken Jan 27, 2024
f0b8fee
Added the environment variable SDL_LOGGING to control default log output
slouken Jan 28, 2024
11c932b
Fixed build
slouken Jan 28, 2024
bb30a35
Fixed Watcom build
slouken Jan 28, 2024
ec25d6b
aaudio: Backport headphone hotplugging support from SDL3.
icculus Jan 27, 2024
c55bd24
Fixed testautomation log callback calling convention
slouken Jan 28, 2024
971508c
autotools: a few libtool updates from mainstream
sezero Jan 28, 2024
faa8fc2
Fix color
fjtrujy Jan 27, 2024
36b8438
Fix scissor usage
fjtrujy Jan 28, 2024
d34a7c5
Fixing viewport
fjtrujy Jan 29, 2024
8ce6fb2
Use the exact motion associated with the warp
slouken Jan 30, 2024
8eed915
Don't use the system iconv on Apple mobile platforms
slouken Feb 1, 2024
f73abd4
testautomation: Don't expect exp to yield exact floating point results
smcv Jan 29, 2024
a7bd18c
test: Don't accept results that are much less than expected
smcv Feb 1, 2024
58907d2
testautomation_math: Fix misleading log output
smcv Feb 2, 2024
05bb182
Don't test 10-bit pixel format conversion
slouken Feb 3, 2024
fc787a4
vulkan_metal.h: Make compatible with ObjC ARC (thanks @jmroot!)
slouken Feb 3, 2024
c53c351
Fix SDL_mfijoystick build issues
jmroot Feb 3, 2024
ca01016
SDL_audiotypecvt.c: Fixed memory corruption when resampling S16 t F32
Wohlstand Feb 3, 2024
a29f37c
SDL_windowsopengl.c: WGL: Fixed null-pointer dereference crash
Wohlstand Feb 3, 2024
a09b0b0
Fix memory leak in SDL_UpdateSteamVirtualGamepadInfo()
meyraud705 Feb 5, 2024
d2a3347
Emscripten_SetWindowFullscreen: Fix crash due to uninitialized Emscri…
past-due Feb 6, 2024
40b61b8
Added VIDPID for OpenFFBoard wheel (thanks @groybe!)
slouken Feb 8, 2024
93d7b6e
Redefine XINPUT_CAPABILITIES_EX as an SDL typedef
slouken Feb 9, 2024
646ccce
Guarded ElementAlreadyHandled with #ifdef ENABLE_PHYSICAL_INPUT_PROFI…
slouken Feb 10, 2024
4ae87e2
Fix broken use of MsgWaitForMultipleObjects.
Themaister Feb 10, 2024
de0cb94
Wayland: Avoid SEGV if a modifier notification comes before the keymap
kuroneko Feb 8, 2024
971c5c2
Explicitly retain and release NSObjects in C structures
slouken Feb 12, 2024
6669d04
Fixed error: unused variable 'axes' [-Werror,-Wunused-variable]
slouken Feb 12, 2024
120b8d4
Revert "wayland: Don't initialize OpenGL when the window flags didn't…
slouken Feb 13, 2024
699cec1
wayland: Don't store wl_output pointers in mode driver data
Kontrabant Feb 14, 2024
d0731ab
Check the SDL_VIDEO_RENDER_??? macros with #if instead of #ifdef
sezero Feb 14, 2024
bc30fb2
don't let SDL_render.c:render_drivers[] have an empty initializer list.
sezero Feb 15, 2024
6c0e353
x11: Use XcursorLibraryLoadCursor to load system cursors when available.
icculus Feb 16, 2024
e2535ba
wayland: Use CSS/freedesktop cursor name "default" as a fallback
smcv Feb 16, 2024
67827c0
wayland: Prefer to use CSS names for cursors, falling back to X11
icculus Feb 16, 2024
aa6c390
emscripten, wayland, x11: Map SIZEALL to "all-scroll" instead of "move"
smcv Feb 16, 2024
271df2f
emscripten, wayland, x11: Share the table of CSS cursor names
smcv Feb 16, 2024
827917e
wayland: Minor cleanup in new mouse cursor selection code.
icculus Feb 16, 2024
df00a7d
x11: Cleaned up system cursor code to match previous Wayland change.
icculus Feb 16, 2024
f24216c
wayland: Don't pass null string pointers to wl_cursor_theme_get_cursor
Kontrabant Feb 18, 2024
903d888
Convert mouse wheel coordinates to renderer view
slouken Feb 20, 2024
4316c5e
audio: fix SSE conversion of Sint8 audio to Float32.
icculus Feb 21, 2024
69fb802
Fixed Visual Studio warning 4459
slouken Mar 30, 2023
54faea8
x11: Don't resize, move, or raise windows when changing the min/max size
Kontrabant Feb 23, 2024
fdbf233
ci: bump cross-platform-actions/action version to v0.23.0
scribam Feb 23, 2024
9a65d12
ci: update deprecated node.js 16 actions
scribam Feb 23, 2024
9eaf7d8
wayland: Remove all references to destroyed outputs from windows
Kontrabant Feb 27, 2024
05f6709
If the viewport changes the cliprect should be updated
slouken Feb 25, 2024
b87116f
SDL_GameControllerGetAppleSFSymbolsNameForButton() returns NULL if th…
slouken Mar 3, 2024
627e158
SDL_GameControllerGetAppleSFSymbolsNameForAxis() returns NULL if the …
slouken Mar 3, 2024
9e1e0fb
Removed the mapping for the G-Shark GS-GP702
slouken Mar 3, 2024
d35dee7
Added a mapping for the Sanwa Supply JY-P76USV controller
slouken Mar 3, 2024
a842bc2
Uppercase the first letter of the class name to match Java conventions
slouken Mar 4, 2024
75c5cff
Fixed "${folder^}Activity: bad substitution" with bash 3.2 on macOS
slouken Mar 5, 2024
bdc7ad8
Keep track of whether the Android on-screen keyboard was opened by th…
slouken Mar 5, 2024
177a836
SDL_RWFromFile, stdio: allow named pipes along with regular files.
sezero Mar 6, 2024
da9bfc4
GDK: Partially revert 2670eb44afec9311ee8fbec447703c427db1e1c8
0x0ade Mar 1, 2024
26054d9
Fixed mapping for the Sanwa Supply JY-P76USV controller
slouken Mar 7, 2024
528b712
Added support for the 6-button SEGA Mega Drive Control Pad for Ninten…
slouken Mar 8, 2024
cd197be
Fixed crash if joystick functions are passed a NULL joystick
slouken Dec 27, 2023
66054a6
Turn HIDAPI joystick support off by default on mobile platforms
slouken Mar 10, 2024
3184936
cmake: we only need a C++ compiler for Android, Haiku and UWP
madebr Mar 11, 2024
e54774f
Removed incorrect mapping for a HORI controller
slouken Mar 12, 2024
d3c89bb
wayland: Allocate the cursor shared memory buffer entirely in memory,…
Kontrabant Mar 12, 2024
88bdc02
Fix build (C90 declaration order)
Kontrabant Mar 13, 2024
59d4a39
Add checks for memfd_create() and posix_fallocate() to the autotools …
Kontrabant Mar 13, 2024
525c317
wayland: Add cursor-shape-v1 protocol support
Kontrabant Mar 14, 2024
b8daf14
If a mapping specifies a crc, don't match for controllers that don't …
slouken Mar 14, 2024
24aedc1
wayland: Always use the entire buffer for the viewport source
Kontrabant Mar 17, 2024
07f04bb
Use the CRC as part of the unique key for mappings
slouken Mar 17, 2024
2d6c100
Added a mapping for the Defender Joystick Cobra R4 (thanks @kotenok20…
slouken Mar 17, 2024
86f223d
PSP: don't block on joystick event query
rofl0r Mar 17, 2024
c17d224
PSP/Joystick: fix formatting
rofl0r Mar 17, 2024
43f0ae1
Improve event processing latency when gamepad/sensor is open
cgutman Mar 19, 2024
4a79fe4
N3DS: Fix locale name and early return.
FtZPetruska Mar 19, 2024
a9ac349
Poll for the initial controller state when using DirectInput
slouken Mar 20, 2024
5df737b
wayland: Check the returned display pointer before dereferencing
Kontrabant Mar 20, 2024
fa18c9b
Add support for MadCatz Saitek Side Panel Control Deck
durandom Mar 22, 2024
82b4496
PSP: improve performance counter res to us granularity
rofl0r Mar 23, 2024
763d768
Fix bug #9331 - SDL3 Android crash getVibrator() == null
1bsyl Mar 22, 2024
37c664a
PSP: fix regression, GetTicks64 should return millisecs
rofl0r Mar 23, 2024
7b6695f
PSP: zero-copy WindowSurface API for direct VRAM access
rofl0r Mar 14, 2024
6ba3e56
SDL_GetWindowSurface: update documentation re: surface->pixels
rofl0r Mar 24, 2024
6e1611c
udev: Fix O(n^2) device walking issue (closes #9092)
twhitehead Mar 23, 2024
5d80179
PSP: send initial SDL_JOYDEVICEADDED event
sharkwouter Mar 24, 2024
cbc9bd9
Add Yawman Arrow flightstick controller
offalynne Mar 25, 2024
eb185e8
VisualC: remove vulkan.hpp
madebr Mar 25, 2024
358a80a
remove non-existent vulkan.hpp and vulkan_mir.h from Xcode project
sezero Mar 25, 2024
5fff9bc
Don't fail joystick initialization if udev isn't available
slouken Mar 25, 2024
0d8ce4a
psp: Fixed building with pspdev when not using CMake.
icculus Mar 28, 2024
4d91f0e
SDL_stdinc.h: Android passes sizeof(ENUM) == sizeof(int) assertion
sezero Mar 28, 2024
02246aa
wikiheaders.pl: Report a function's header file name.
icculus Mar 31, 2024
f1690e2
Workaround a macOS cursor-related bug.
SirBogman Mar 16, 2024
906ad64
Fix Caps Lock and Backspace mapping for Colemak
5E-324 Jul 21, 2023
1fa6142
Fix default Windows window icon not suiting the DPI.
Clownacy Apr 2, 2024
9216b7a
stdinc: modify default alloca prototype
madebr Apr 10, 2024
e75d726
include: Fixes to make the headers friendly with the latest wikiheaders.
icculus Apr 11, 2024
4c3b8b2
Fixed reference path for buildshaders.bat
Romans-I-XVI Apr 5, 2024
596096a
Add a quirk for fullscreen-only video drivers
ccawley2011 Apr 12, 2024
6c6b497
Prefer display modes that exactly match the desired format or refresh…
ccawley2011 Apr 12, 2024
4df852c
3DS: Ensure that touchscreen events are associated with a window
ccawley2011 Apr 13, 2024
154ec5c
testmouse: Create the window on the touch screen when building for th…
ccawley2011 Apr 13, 2024
59a0416
3DS: Improve framebuffer support
ccawley2011 Apr 11, 2024
effc169
Fixed build
slouken Apr 15, 2024
4e29be8
Fixed compilation with C89 (thanks @d-s-a!)
slouken Apr 17, 2024
b2d1178
initial playdate support
ericlewis Mar 30, 2022
e276999
move syscalls to core
ericlewis Mar 30, 2022
a7edf98
add game controller support
ericlewis Apr 1, 2022
40eb77b
first pass at adding cmake support
ericlewis Apr 1, 2022
76b1e02
use `PLAYDATE_SDK_PATH`
ericlewis Apr 1, 2022
d02ea31
playdate: change some preprocessor lines from `#if` to `#ifdef`
icculus Apr 23, 2024
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
  •  
  •  
  •  
90 changes: 90 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
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_array_for_each",
"udev_list_entry_foreach",
]

---

79 changes: 79 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# For format see editorconfig.org
# Copyright 2022 Collabora Ltd.
# SPDX-License-Identifier: Zlib

root = true

[*.{c,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

[*.xml]
indent_size = 4
indent_style = space

[{CMakeLists.txt,sdl2-config*.cmake.in,cmake/*.cmake}]
indent_size = 2
indent_style = space

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

[configure.ac]
# Inconsistently 2-, 4- or occasionally 3-space indented, but mostly 4,
# so let's use 4 for new code
indent_size = 4
indent_style = space

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

[Makefile.os2]
indent_size = 4
indent_style = space

[test/Makefile.os2]
indent_size = 2
indent_style = space

[{src/core/os2/geniconv/makefile,src/core/os2/geniconv/os2cp.c}]
indent_size = 2
indent_style = space

[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
16 changes: 16 additions & 0 deletions .github/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.0...3.5)
project(ci_utils C CXX)

set(txt "CC=${CMAKE_C_COMPILER}
CXX=${CMAKE_CXX_COMPILER}
CFLAGS=${CMAKE_C_FLAGS}
CXXFLAGS=${CMAKE_CXX_FLAGS}
LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_C_STANDARD_LIBRARIES}
")

message("${txt}")

set(VAR_PATH "/tmp/env.txt" CACHE PATH "Where to write environment file")
message(STATUS "Writing CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS environment to ${VAR_PATH}")

file(WRITE "${VAR_PATH}" "${txt}")
73 changes: 70 additions & 3 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,78 @@ on: [push, pull_request]

jobs:
android:
name: ${{ matrix.platform.name }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
platform:
- { name: Android.mk }
- { name: CMake, cmake: 1, android_abi: "arm64-v8a", android_platform: 23, arch: "aarch64" }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: nttld/setup-ndk@v1
id: setup_ndk
with:
ndk-version: r21e
- name: Build
run: ./build-scripts/androidbuildlibs.sh
- name: Build (Android.mk)
if: ${{ matrix.platform.name == 'Android.mk' }}
run: |
./build-scripts/androidbuildlibs.sh
- name: Setup (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
run: |
sudo apt-get update
sudo apt-get install ninja-build pkg-config
- name: Configure (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
run: |
cmake -B build \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
-DSDL_WERROR=ON \
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
-DSDL_STATIC_PIC=ON \
-DSDL_VENDOR_INFO="Github Workflow" \
-DCMAKE_INSTALL_PREFIX=prefix \
-DCMAKE_BUILD_TYPE=Release \
-GNinja
- name: Build (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
run: |
cmake --build build --config Release --parallel --verbose
- name: Install (CMake)
if: ${{ matrix.platform.name == 'CMake' }}
run: |
cmake --install build --config Release
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
( cd prefix; find ) | LC_ALL=C sort -u
- name: Verify CMake configuration files
if: ${{ matrix.platform.name == 'CMake' }}
run: |
cmake -S cmake/test -B cmake_config_build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup_ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
cmake --build cmake_config_build --verbose
- name: Verify sdl2-config
if: ${{ matrix.platform.name == 'CMake' }}
run: |
export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
cmake/test/test_sdlconfig.sh
- name: Verify sdl2.pc
if: ${{ matrix.platform.name == 'CMake' }}
run: |
export CC="${{ steps.setup_ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=${{ matrix.platform.arch }}-none-linux-androideabi${{ matrix.platform.android_platform }}"
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
- name: Verify Android.mk
if: ${{ matrix.platform.name == 'CMake' }}
run: |
export NDK_MODULE_PATH=${{ env.SDL2_DIR }}/share/ndk-modules
ndk-build -C ${{ github.workspace }}/cmake/test APP_PLATFORM=android-${{ matrix.platform.android_platform }} APP_ABI=${{ matrix.platform.android_abi }} NDK_OUT=$PWD NDK_LIBS_OUT=$PWD V=1
51 changes: 51 additions & 0 deletions .github/workflows/cpactions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build (C/P Actions)

on: [push, pull_request]

jobs:
freebsd:
runs-on: ubuntu-latest
name: FreeBSD
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Build
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
version: '13.2'
shell: bash
run: |
sudo pkg update
sudo pkg install -y \
gmake \
pkgconf \
libXcursor \
libXext \
libXinerama \
libXi \
libXfixes \
libXrandr \
libXScrnSaver \
libXxf86vm \
wayland \
wayland-protocols \
libxkbcommon \
mesa-libs \
libglvnd \
evdev-proto \
libinotify \
alsa-lib \
jackit \
pipewire \
pulseaudio \
sndio \
dbus \
zh-fcitx \
ibus \
libudev-devd
mkdir build_autotools
export CPPFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
(cd build_autotools && ../configure --disable-static)
gmake -C build_autotools -j`sysctl -n hw.ncpu` V=1
39 changes: 34 additions & 5 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,40 @@ jobs:
emscripten:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: mymindstorm/setup-emsdk@v10
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14
with:
version: 2.0.27
version: 3.1.35
- name: Install ninja
run: |
sudo apt-get -y update
sudo apt-get install -y ninja-build
- name: Configure CMake
run: emcmake cmake -B build
run: |
emcmake cmake -S . -B build \
-DSDL_WERROR=ON \
-DSDL_TESTS=ON \
-DSDL_INSTALL_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=prefix \
-GNinja
- name: Build
run: cmake --build build/
run: cmake --build build/ --verbose
- name: Run build-time tests
run: |
set -eu
export SDL_TESTS_QUICK=1
# FIXME: enable Emscripten build time tests
# ctest -VV --test-dir build/
- name: Install
run: |
echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
cmake --install build/
- name: Verify CMake configuration files
run: |
emcmake cmake -S cmake/test -B cmake_config_build \
-DCMAKE_BUILD_TYPE=Release \
-DSDL_VENDOR_INFO="Github Workflow" \
-DTEST_SHARED=FALSE \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
cmake --build cmake_config_build --verbose
2 changes: 1 addition & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
- { name: tvOS, target: Static Library-tvOS, sdk: appletvos }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build
Loading