Ryan C. Gordon
f9fc36be9e
pipewire: Report correct device default formats instead of hardcoding Float32.
...
The comment in the source wasn't true; PipeWire doesn't _have_ to work in
float format. It presumably does if it has to mix, but if a game is the only
thing making noise on the system--a common scenario--then it might be able to
pass, say, Sint16 data straight through to the hardware without conversion.
Fixes #12129 .
(cherry picked from commit afc1d9122b
)
2025-07-29 18:23:33 -04:00
Dan Andrus
f8119d4760
Check NSWindow::isVisible before sending SDL_WINDOWEVENT_RESTORED during Cocoa_WindowListener::windowDidResize
...
(cherry picked from commit e610529e84
)
2025-07-28 11:59:06 -07:00
Ozkan Sezer
1b35c66aa8
sun audio: remove ifdefs, always include sys/audioio.h and sys/ioctl.h
...
(cherry picked from commit ead4a032d3
)
2025-07-28 17:01:20 +03:00
Ozkan Sezer
553ea4e4ee
autotools, cmake: fix the sys/audioio.h checks.
...
Reference issue: https://github.com/libsdl-org/SDL/issues/13405 .
(cherry picked from commit 74df61530f
)
2025-07-28 17:01:20 +03:00
Ryan C. Gordon
c438953aa2
sunaudio: don't compile in the sun audio backend if sys/audioio.h is missing.
...
Newer Solaris-based releases, like OpenIndiana, don't include this, using
Open Sound System, or something layered over OSS like PulseAudio, instead.
Fixes #13405 .
(cherry picked from commit cf1eb95fb1
)
2025-07-28 17:01:20 +03:00
Anonymous Maarten
6e77327789
ci+n3ds: avoid apt-get package manager
...
- use Unix Makefiles (with parallelization) CMake generator
- use binutils strings binary from devkitpro
( Manual backport of commit e6d200e51c
)
( cherry picked from commit b36252b120
)
2025-07-28 00:10:50 +03:00
vanfanel
e25c61cda8
SDL2: Add missing symbol loading for SDL_GetDefaultAudioInfo() implementation on ALSA.
...
(cherry picked from commit 874ca5a678
)
2025-07-17 11:15:25 -07:00
vanfanel
28f2944947
SDL2: Implement SDL_GetDefaultAudioInfo() on the ALSA backend.
...
(cherry picked from commit 8d5984464e
)
2025-07-17 11:15:25 -07:00
Yorick Reum
ab9f59e59a
Xcode-iOS/Demos/src/fireworks.c: Make rendering CPU efficient
...
(cherry picked from commit 6c9c2a9ac2
)
2025-07-12 07:46:36 -07:00
Anonymous Maarten
f99f57ffd1
ci: build MSVC release binary on windows-2025
...
(cherry picked from commit 8605624158
)
2025-07-12 13:08:54 +02:00
Ryan C. Gordon
7f371c7808
cocoa: Patched to compile.
...
(cherry picked from commit b537380065
)
2025-07-11 09:56:20 -07:00
Ryan C. Gordon
d98087a0c3
cocoa: Don't use trick of briefly focusing the Dock on newer macOS releases.
...
On newer systems, the trick isn't necessary, and if you do it, if the user is
moving the mouse when launching the app, it'll show a hidden Dock.
Fixes #10340 .
(manually backported from SDL3 from commit 279dabfc96
)
(cherry picked from commit b2c3e6fade
)
2025-07-11 09:56:20 -07:00
Wouter Wijsman
933715fa45
PSP: Truncate thread name when passing to sceKernelCreateThread
...
(cherry picked from commit 309d1481a4
)
2025-07-11 09:56:20 -07:00
Ozkan Sezer
73492c5570
fix ARM64 linkage with Visual Studio >= 17.14 when SDL_LIBC is disabled
...
Reference issue: https://github.com/libsdl-org/SDL/issues/13254
(cherry picked from commit 2fb6abb9ad
)
2025-07-09 01:25:19 +03:00
evgenydrainov
19fc5c2953
keyboard: Add reference to SDL_Keymod in the comments
...
(cherry picked from commit 2bc3ec44b1
)
2025-06-24 07:37:01 -07:00
Mitch Cairns
c2a62ee696
Fixed Nintendo Switch thumbstick calibration
...
(cherry picked from commit 3a6f9e01f8
)
(cherry picked from commit e4475d1868
)
2025-06-22 15:29:27 -07:00
Sam Lantinga
c1b8ac9764
Fixed Nintendo Switch Pro thumbstick calibration
...
Fixes https://github.com/libsdl-org/SDL/issues/13246
(cherry picked from commit 038a3806eb
)
(cherry picked from commit 6a71328638
)
2025-06-21 20:06:37 -07:00
Wohlstand
7a43692bdf
Vita Render: Limit the scope of cliprect to viewport
...
Don't allow cliprect be larger than viewport's scope
(cherry picked from commit 6701f938f7
)
2025-06-20 13:16:59 -07:00
Wohlstand
99ad0871b1
Vita: Fixed absence of clipping when viewport is set
...
#13034
(cherry picked from commit 1c09a7117a
)
2025-06-20 13:16:59 -07:00
ceski
f901079dd5
Read Switch controller gyro/accel sensitivity coeffs (SDL2)
...
These vary by controller, so using the stored values should improve the accuracy of the sensor data.
(cherry picked from commit 9eb50a906a
)
2025-06-13 12:19:16 -07:00
Sam Lantinga
98d1f3a45a
Updated to version 2.32.8 for release
release-2.32.8
2025-06-02 16:00:39 -07:00
Ryan C. Gordon
1226e6b2bc
Revert "opengles2: Restore previous default texture_formats."
...
This reverts commit 9f7ccbe8d4
.
Fixes #13109 .
(cherry picked from commit 3c08172d06
)
2025-06-02 09:38:50 -07:00
Francisco Javier Trujillo Mata
213b074697
Fix wrong callback type
...
(cherry picked from commit c89357bf60
)
(cherry picked from commit d0c2d8bc40
)
2025-05-20 11:12:16 -07:00
Sam Lantinga
4177e06c09
Fixed rare crash trying to interrupt SDL_WaitEvent()
...
Fixes https://github.com/libsdl-org/SDL/issues/12797
(cherry picked from commit 992e4c59bd
)
(cherry picked from commit 33eb167da8
)
2025-05-19 14:24:41 -07:00
Joe [ReRezd]
4318013777
Fix: GameCube controller adapter hotplug not working
...
SDL_PrivateJoystickAdded was called before setting the InstanceId in the adapters ctx->joysticks array. This would eventually broadcast the SDL_EVENT_JOYSTICK_ADDED event with the new InstanceId, if your program listens for the added events and opens joysticks at that point it would always fail because there would be no matching InstanceId in the ctx->joysticks array.
(cherry picked from commit afd1e51023
)
(cherry picked from commit 4b4f6b3e22
)
2025-05-19 08:26:52 -07:00
Sam Lantinga
3364486f56
Define illegal_instruction() when it will be actually used
...
(cherry picked from commit 29d2116495
)
(cherry picked from commit 2163887f29
)
2025-05-08 13:10:28 -07:00
Sam Clegg
dc69988fdf
[emscripten] Remove reference to Module['createContext']
...
Backported from https://github.com/libsdl-org/SDL/pull/12970
(cherry picked from commit c0f78dee5e
)
2025-05-06 14:46:53 -07:00
A. Wilcox
4ed1fc5bff
cpuinfo: Use auxv for AltiVec on Linux if possible
...
The SIGILL handler is not very reliable and can cause crashes.
Linux provides the CPU's AltiVec support status in getauxval.
(cherry picked from commit 7490471796
)
(cherry picked from commit 17e6208c1b
)
2025-05-04 14:02:12 -07:00
Ozkan Sezer
84081d884b
don't prototype strdup() for __clang_analyzer__ case in windows builds.
...
Fixes: https://github.com/libsdl-org/SDL/issues/12948 .
(cherry picked from commit 17bba029ba
)
2025-05-04 20:48:24 +03:00
Sam Lantinga
a5fad8b0cb
Updated to version 2.32.7 for development
2025-05-04 09:18:06 -07:00
Sam Lantinga
6510d6ccbf
Updated to version 2.32.6 for release
release-2.32.6
2025-05-04 08:52:05 -07:00
Derek Schuff
b0b50da4b6
Port #12581 to SDL2
...
This fixes undefined behavior resulting from adding offsets to nullptr.
(cherry picked from commit a220e7c422
)
2025-05-01 21:36:53 -07:00
Sam Lantinga
8b7a088efc
Call IOHIDDeviceClose() if needed in hid_close() on macOS
...
Unregistering the input report callback marks the device as disconnected, so IOHIDDeviceClose() would never be called if the device wasn't already disconnected when hid_close() was called.
Fixes https://github.com/libsdl-org/SDL/issues/12255
(cherry picked from commit 2442c85cb8
)
2025-04-29 11:24:27 -07:00
Sam Lantinga
7fc5edab8e
Revert "Don't leak device handle in macOS 10.10 or newer"
...
This reverts commit 5925c27efb
.
Fixes https://github.com/libsdl-org/SDL/issues/12807
(cherry picked from commit 5b951141d2
)
2025-04-29 11:24:27 -07:00
Cameron Gutman
24ccde693e
events: Fix undefined behavior when disabling some event types
...
Shifting a signed int left by 31 is UB.
(cherry picked from commit 15fd3fcdc2
)
2025-04-29 00:32:43 -05:00
Sam Lantinga
f46ef5d76d
Fixed reliability of initializing Switch controllers on macOS
...
It looks like both macOS (15.1.1) and SDL are trying to talk to the controller at the same time, which can cause interleaved replies or even locking up the controller. Waiting a bit before talking to the controller seems to take care of this.
(cherry picked from commit 45b01d16b1
)
2025-04-28 20:23:37 -07:00
Petar Popovic
5696677558
SDL_BlitSurface() comment: only dstrect is modified in function
...
(cherry picked from commit 035518d065
)
2025-04-22 10:23:02 -07:00
Boris I. Bendovsky
093307f1f4
[SDL2] Fix using of DXSDK_DIR in older CMake
...
- Remove duplicate 'dollar' symbol in the path
- Use command 'file' to normalize file paths
(cherry picked from commit 40b1eac541
)
2025-04-22 10:12:55 -07:00
Ozkan Sezer
f54014e173
SDL_cpuinfo.h: only include immintrin.h for x86 targets.
...
Reference issue: https://github.com/libsdl-org/SDL_image/issues/537
Reference issue: https://github.com/libsdl-org/SDL_mixer/issues/648
(cherry picked from commit bfab0a968f
)
2025-04-03 19:55:04 +03:00
Sam Lantinga
64ad33884d
Updated to version 2.32.5 for development
2025-03-31 12:58:50 -07:00
Sam Lantinga
2359383fc1
Updated to version 2.32.4 for release
release-2.32.4
2025-03-31 09:12:51 -07:00
Sam Lantinga
b2a95b2482
Default SDL_HINT_ACCELEROMETER_AS_JOYSTICK to 0 on Linux
...
The Linux joystick driver supports associating sensor devices with the related controller device, so enable that by default.
Fixes https://github.com/libsdl-org/SDL/issues/12043
(cherry picked from commit 3e47181800
)
2025-03-25 09:09:59 -07:00
Carl Åstholm
2708e08f40
emscripten: Don't use legacy JS library functions for assertions
...
(cherry picked from commit 54f5b73333
)
(cherry picked from commit a8f0eb4c33
)
2025-03-20 16:36:25 -07:00
Dragon-Baroque
3f6efbf2df
The posix4 library has been merged into the libc library
...
Backported from commit 07e4dea693
.
Reference issue: https://github.com/libsdl-org/SDL/issues/12588 .
(cherry picked from commit d63b3376a4
)
2025-03-20 09:48:20 +03:00
Sam Lantinga
9b048e73a2
Fixed raw input device GUIDs changing randomly between runs
...
On Windows 11, apparently HidD_GetManufacturerString() and HidD_GetProductString() can return TRUE without actually filling in any string data.
Fixes https://github.com/libsdl-org/SDL/issues/12566
(cherry picked from commit 4fc9509ab7
)
(cherry picked from commit 52146cf067
)
2025-03-17 13:57:58 -07:00
Sam Lantinga
d3bb91522f
Fixed crash if info->path is NULL
...
(cherry picked from commit 715301cef5
)
(cherry picked from commit 46a51b4298
)
2025-03-17 09:48:13 -07:00
SDL Wiki Bot
c8c4c97727
Sync SDL2 wiki -> header
...
[ci skip]
(cherry picked from commit fc536dcb7e
)
2025-03-12 22:55:50 +03:00
Sam Lantinga
f08a5cfcab
Fixed sscanf("026", "%1x%1x%1x", &r, &g, &b)
...
Fixes https://github.com/libsdl-org/SDL/issues/12510
(cherry picked from commit be6ed6e9c4
)
(cherry picked from commit 1caae3e9e4
)
2025-03-10 15:45:43 -07:00
SDL Wiki Bot
e9d2f60e1c
Sync SDL2 wiki -> header
...
[ci skip]
(cherry picked from commit 22a87a22ca
)
2025-03-07 22:45:02 +03:00
Neal Gompa
9e079fe9c7
pipewire: Ensure that the correct struct is used for enumeration APIs
...
PipeWire now requires the correct struct type is used, otherwise
it will fail to compile.
Reference: 188d920733
Fixes: https://github.com/libsdl-org/SDL/issues/12224
(cherry picked from commit d35bef64e9
)
(cherry picked from commit 6be87ceb33
)
2025-03-06 14:37:46 -05:00