Commit Graph

14137 Commits (3976bbef2ad3896c4411c4fcd5bfc5e3bd64bb4b)

Author SHA1 Message Date
Ryan C. Gordon 0e1669e296
audio: Fixed audiostreams converting incorrect channel counts. 2023-05-09 10:58:32 -04:00
Ryan C. Gordon 7f219aa369
audio: Make sure AudioStream's internal buffers are large enough.
It needs to deal with ConvertAudio growing buffers in-place, as it might
convert smaller types to float as an intermediate step.
2023-05-09 10:57:23 -04:00
Ryan C. Gordon c7629704b4
audio: SDL_ConvertAudioSamples shouldn't calculate its output buffer size.
Just use what the AudioStream calculates instead.
2023-05-09 10:56:34 -04:00
Ryan C. Gordon a88aeb2a8a coreaudio: Flush/stop the AudioQueue before disposing of it.
Otherwise, a CoreAudio thread lingers forever, and coreaudiod eats CPU
until the SDL process terminates.

Fixes #7689.

(cherry picked from commit 86786ed5447fe32ea2e48f12f0598816a76721c2)
2023-05-08 14:26:34 -04:00
Semphris 7f2ef4d02f Implement SDL_GetPath stub for all OSes 2023-05-08 09:36:39 -07:00
Ozkan Sezer ef2ad2b0c6 windows/SDL_sysfilesystem.c: fix SHGetKnownFolderPath calling convention 2023-05-08 11:55:32 +03:00
Frank Praznik b92eaddbbd wayland: Fix the corner case when positioning popups
If the popup is positioned such that it requires correction on both the x and y axes, it will be aligned with parent only at the window corners, which is neither overlapping nor adjacent. In this case, nudge the window plus or minus one screen unit on the x axis so it is properly adjacent to the parent and within spec guidelines.
2023-05-06 12:35:47 -04:00
Sam Lantinga b6df25c334 Removed redundant __powerpc__ check 2023-05-06 08:44:19 -07:00
Jeremy Rand 9142292f4a SDL_blit_N.c: Move ppc64le swizzle outside of loop
An in-place swizzle mutation was erroneously inside of a loop, which
caused each consecutive 4-pixel vector to alternate between correct and
incorrect endianness.

The bug was introduced in 715e070d29.

Thanks to RobbieAB for reporting the bug.

Fixes https://github.com/libsdl-org/SDL/issues/3428
2023-05-06 11:05:48 -04:00
Ozkan Sezer 26903f237f windows/SDL_sysfilesystem.c: replace KNOWNFOLDERID type usage with GUID 2023-05-06 01:10:02 +03:00
Frank Praznik 1bf5a78b53 wayland: Don't print an error when moving a hidden popup window
Repositioning a hidden popup window is valid behavior, so don't print an error message in this case.
2023-05-05 14:05:34 -04:00
Frank Praznik 27085df50d wayland: Remove redundant window geometry configuration
The window geometry will be updated when in underlying shell surface config handler, before the config is ack-ed, so no need to do it in the popup config handler.
2023-05-05 13:54:10 -04:00
Frank Praznik eb6837e353 wayland: Validate and trigger the repositioning of popups in more cases
Validate and reposition popups in any case where the position or size may have changed. In particular, this fixes cases where the position parameters were adjusted while the window was hidden, as the new values weren't being applied in all cases.
2023-05-05 13:54:10 -04:00
Frank Praznik 17fba24e21 wayland: Adjust overlap required for popups to be considered adjacent
Popups beyond the right and bottom borders of the window must be width/height minus one in order to be considered adjacent and not be instantly closed or cause a protocol error.
2023-05-05 13:54:10 -04:00
Anonymous Maarten c810e5f63d video: set error code when SetWindowPosition fails 2023-05-05 17:50:32 +02:00
Ozkan Sezer 52c19bd21b attempt to fix more build failures against older Win32 SDKs. 2023-05-05 03:33:10 +03:00
Ozkan Sezer d7f1719777 fixed -Wundef warning due to HAVE_MMDEVICEAPI_H 2023-05-05 03:32:56 +03:00
Sam Lantinga 450c947949 Actually define the folder GUIDs 2023-05-04 16:39:16 -07:00
Sam Lantinga e0e95b1ea9 Fixed coding style and building on older Windows SDKs 2023-05-04 16:28:16 -07:00
Sam Lantinga 9b87de258f Fixed crash in new audio channel conversion code
Each loop needs to be run num_frames times, and the source and destination pointers are incremented by the number of channels during the conversion.
2023-05-04 15:50:38 -07:00
Semphriss c1dab7745a
Add SDL_GetPath() for default OS folders (#7665) 2023-05-04 11:38:11 -07:00
Anonymous Maarten 72e5a52c51 ci: use Haiku cross toolchain
A cross compiler is much faster then an emulated one.
2023-05-04 08:26:54 -04:00
Anonymous Maarten fe68fd3af9 ci: disable pull_request trigger for haiku 2023-05-04 05:15:10 +02:00
Ryan C. Gordon e191bc8491 audio: Simplified GetFirstAudioFormat/GetNextAudioFormat.
Now it just returns an iterable array and needs no global state.
2023-05-03 22:37:23 -04:00
Sam Lantinga b6ca360228 Added support for the Saitek Cyborg V.3 Rumble Pad in PS3 mode 2023-05-03 09:47:16 -07:00
Sam Lantinga 3f0c2a6694 Don't set the display scale if DPI scaling isn't enabled
In this case we want the display mode pixel to screen coordinates to be 1:1 ... but we lose information about the UI scaling of the display - is that okay?
2023-05-03 09:47:13 -07:00
Brick 86b5f40b53 Fixed CalculateAudioStreamWorkBufSize 2023-05-02 11:16:20 -04:00
Brick 079ae065f1 Added SDL prefix AUDIO_* constants 2023-05-02 08:09:06 -07:00
Brick 1ee2832326 Fixed SDL_ConvertMonoToStereo_SSE reading out of bounds 2023-04-30 13:14:20 -04:00
Sam Lantinga 255c3b7c82 By default, OpenBSD uses Linux controller mappings
Fixes https://github.com/libsdl-org/SDL/issues/7609
2023-04-29 17:09:17 -07:00
Sam Lantinga 0d559b7cb3 Fixed parsing SDL_mutex.h 2023-04-29 10:14:03 -07:00
Eric f7df966b41 SDL_JOYBALLMOTION 2023-04-28 23:35:33 -04:00
Eric e8c16ce483 Update migration guide with info on trackballs 2023-04-28 23:35:33 -04:00
Frank Praznik bee6099372 events: Emit an event when a window is destroyed
As child windows can be recursively destroyed when their parents are destroyed, emit an event to notify the application when a window is being or has been implicitly destroyed so that it can appropriately clean up any associated resources.

If the application has registered an event watch, the destroy message will be received when the window handle is still valid, so the application can retrieve and release any userdata associated with the window. If the message is processed at any time after that, the window handle is already invalid and the ID is only useful for application-side bookkeeping purposes.
2023-04-28 15:09:47 -04:00
SDL Wiki Bot 78cfc23993 Sync SDL3 wiki -> header 2023-04-28 19:09:14 +00:00
Sam Lantinga 87ad71f9b2 Rename SDL mutex, semaphore and condition variable types to match SDL 3.0 naming convention 2023-04-28 12:08:33 -07:00
Sam Lantinga 61c0c009ab Rename SDL semaphore and condition variable functions to match SDL 3.0 naming convention
Fixes https://github.com/libsdl-org/SDL/issues/7642
2023-04-28 12:08:33 -07:00
Sam Lantinga 170c410d35 Remove old mutex macros 2023-04-27 19:13:35 -07:00
SDL Wiki Bot 38d22aed67 Sync SDL3 wiki -> header 2023-04-28 01:55:15 +00:00
Ryan C. Gordon e474047ff8 rwlock: Added SDL_rwlock API for shared locks. 2023-04-27 21:54:02 -04:00
Ryan C. Gordon 776820526b windows: Use InitializeSRWLock explicitly.
The docs say you should, if not statically initializing an SRWLOCK--which
we aren't--but in practice this is probably just being pedantic.

Still, better (thread) safe than sorry!
2023-04-27 21:54:02 -04:00
Ryan C. Gordon 70a501d8ec winrt: Don't reference generic Condition Variables at all.
It always has the SRWLOCK implementation available to it, so let the
linker throw away the generic version if possible.
2023-04-27 21:54:02 -04:00
Ryan C. Gordon 736f9fb9b9 mutex: Fixed typos in documentation 2023-04-27 21:54:02 -04:00
Sam Lantinga a4b4dff4a2 Added support for the Astro C40 in Xbox 360 mode 2023-04-27 17:10:44 -07:00
SDL Wiki Bot 60c5888423 Sync SDL3 wiki -> header 2023-04-27 22:36:15 +00:00
Ryan C. Gordon e5a6c24c82 audio: Redesigned audio conversion code for SDL3.
- SDL_AudioCVT is gone, even internally.
- libsamplerate is gone (I suspect our resampler is finally Good Enough).
- Cleanups and improvements to audio conversion interfaces.
- SDL_AudioStream can change its input/output format/rate/channels on the fly!
2023-04-27 18:35:15 -04:00
Sam Lantinga 44bec9c01c Fixed build 2023-04-27 13:06:21 -07:00
Sam Lantinga c10849b40b Added support for new Xbox Elite 2 firmware 2023-04-27 12:33:33 -07:00
Sam Lantinga eaf17050b4 Allow popup windows to be raised through SDL_RaiseWindow
- This allows specific child popup windows to be activated explicitly.
2023-04-26 16:31:18 -07:00
Sam Lantinga b701ac0266 Fixed building with Java 1.7 2023-04-26 14:14:59 -07:00