Commit Graph

12528 Commits (af45ae7296ad608b8ef541e40ab5c5b0f202a159)

Author SHA1 Message Date
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
Sam Lantinga 83554cc307 Fixed outdated symbol renaming hints 2023-04-26 14:11:38 -07:00
Sam Lantinga c5cdaef6c3 Fixed function documentation references 2023-04-26 14:10:44 -07:00
Linus Probert 43f65a6ef0 wayland: Fixes a memory leak wheere primary selection isn't freed 2023-04-24 11:59:39 -07:00
Ozkan Sezer ae9119c36b hidapi/mac: replace sprintf uses with snprintf.
Reference issues:
-  https://github.com/libusb/hidapi/pull/509
-  https://github.com/libusb/hidapi/pull/511
2023-04-24 10:46:05 -07:00
Ozkan Sezer 62d1a2c836 hidapi/mac: import mainstream commit c1b9d2ad
c1b9d2ad98
Properly handle the close of run loop on macOS
(https://github.com/libusb/hidapi/pull/522)
- as per documentation `kCFRunLoopRunStopped` should be handled once the runloop is closed via `CFRunLoopStop`;
- if it is not handled - a race condition/crash may happen on the latest macOS when a device gets disconnected while being open;
2023-04-24 10:46:05 -07:00
Mingjie Shen ac607c1088 SDL_ConvertSurface(): add null pointer check
Check return values of SDL_CreateSurface()
and SDL_ConvertSurface().
2023-04-23 17:43:10 -07:00
Mingjie Shen bf8c9d2d70 Check return value of VIRTUAL_HWDataForIndex() 2023-04-23 17:40:15 -07:00
Mingjie Shen a4604cb0d6 Check return value of SDL_malloc() 2023-04-23 08:57:12 -04:00
Frank Praznik f431037f62 wayland: Insert new displays at the end of the output list
Insert new displays at the end of the list instead of the front so that the initial ordering, as exposed by the compositor, is preserved. This is particularly important when the compositor exposes the xdg-output instance after the wl_output instance, as xdg-output must be attached to the outputs in the same order that wl_output exposed them, or they can be added to the SDL output list in reverse order.
2023-04-21 12:59:36 -04:00