Commit Graph

12502 Commits (da3fefc65cff69c9683af70bfddb8e9e59e7fee7)

Author SHA1 Message Date
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
Sam Lantinga 0467301baf Report PS3 accelerometer values in m/s2 instead of Gs 2023-04-19 13:10:39 -07:00
Sylvain 9d18b4b5ed Android: fix crash when AAUDIO isn't used (bug #7620) 2023-04-18 21:34:18 +02:00
Frank Praznik bad4f4e5ac wayland: Destroy proxy wrappers before and callbacks before event queues
Destroy any proxy wrappers and callbacks before the associated event queues to silence libwayland warnings about destroying the queues while proxies are still attached.
2023-04-18 14:37:16 -04:00
Sylvain bbdde648d8 Android: let main return normally for testautomation 2023-04-14 12:26:12 +02:00
Sylvain 7afe735b5f SDL_test: add more color when success/fail/skip 2023-04-14 12:12:45 +02:00
Sylvain 117169d610 Android AAUDIO: handle multiple devices 2023-04-14 11:31:47 +02:00
Sylvain f38cb0d06f Android: don't add telephony device, as it cannot be opened 2023-04-14 11:31:27 +02:00
Simon McVittie c335e3db82 test/template.test.in: Pass SDL_NONINTERACTIVE_ARGUMENTS to installed-tests
Otherwise they'll try to run with no arguments, and fail, when run by
ginsttest-runner.

Fixes: 81ca9d61 "cmake+test: add more automated tests + use properties"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-04-12 15:04:11 +00:00
Ozkan Sezer dfff017fc6 testaudiocapture.c: added missing return statement to main() 2023-04-12 12:56:10 +03:00
Ozkan Sezer c41a76657e SDL_timer.c: silence a minor warning. 2023-04-12 12:55:40 +03:00
Sylvain 0a33ed7a2b testaudiocapture: let main exit normally 2023-04-12 11:43:20 +02:00
Sylvain c101e719fd testprogram: let main() return normally, don't exit for platform (eg Android) where there is some cleanup afterward. 2023-04-12 11:37:26 +02:00
Sylvain ec053ec4f8 Android: need to save/restore the swap interval / vsync
otherwise, there is a difference of framerate, either with gles2 or SDL_renderer (testspriteminimal, testgles2).
2023-04-12 11:09:59 +02:00
Frank Praznik 8162d6659a wayland: Use the integer buffer scale event when applicable
wl_compositor v6 introduces the preferred buffer scale event, which serves a similar function to the fractional scale protocol, but deals in integer scale factors. Listen to this event when the wl_compositor version is >= 6 and the fractional scale protocol is not present to set the scale factor for surfaces.
2023-04-10 10:16:33 -04:00
Sam Lantinga 05b701f12e Fix win32 windows with WS_EX_COMPOSITED style continuing to receive WM_PAINT messages after ValidateRect
- Composited windows seem to need to actually paint (or appear to paint) through calls to Begin/EndPaint to properly validate
  their update region. If not done they will continue to receive WM_PAINT messages for the same region.
2023-04-07 06:20:28 -07:00
Sam Lantinga 17bdea7a91 Fix pop-up windows changing position for each HideWindow()/ShowWindow() cycle
When X11_UpdateWindowPosition() was called and the position didn't update
we would fire an SDL_EVENT_WINDOW_MOVED event with the global x,y for
the pop-up instead of the relative position for the pop-up.

This change ensures we always have a relative position for pop-ups before sending
the SDL_EVENT_WINDOW_MOVED event.
2023-04-06 15:12:09 -07:00
Sam Lantinga 92821f7a82 Fixed Visual Studio warning 4389: '==': signed/unsigned mismatch 2023-04-06 15:11:56 -07:00
Sam Lantinga acadb6f873 More defensive coding against dangling device pointers 2023-04-06 11:33:27 -07:00
Sam Lantinga 1a20ccb289 Clarified the expected sensor value when a game controller is at rest 2023-04-06 09:55:01 -07:00
Sam Lantinga 558bbbb07a The latest Armor-X Pro firmware update fixes the sign on the Z axis of the sensors 2023-04-06 09:55:01 -07:00
Sylvain 3c703f2061 Android: message to indicate that main() is called for the 1 or n'th time 2023-04-06 10:08:07 +02:00
Cyril Dubet 60dcaff7eb Fix key code names for ISO keyboard layouts 2023-04-05 17:03:05 -07:00
Sam Lantinga 73b2faea4e The macOS minimum deployment target is now 10.11
Xcode 14.3 does not allow targeting 10.9, the minimum recommended version is 10.13 and the minimum possible version is 10.11.
2023-04-05 11:37:27 -07:00
Sam Lantinga e13b74ccf0 Fixed crash if joystick->hwdata != NULL && device->driver == NULL
This should never happen, but we're seeing it in the wild, so make sure that we can never call into a NULL device driver.
2023-04-05 11:24:27 -07:00
Frank Praznik a21ee02095 wayland: Use the output description from wl_output as of v4
xdg-output names and descriptions are deprecated in favor of those provided by the core wl_output protocol as of v4. Bump wl_output support to v4 and ignore the xdg-output description in favor of the wl_output description when appropriate.
2023-04-05 10:24:23 -04:00
Frank Praznik 5c27bc81d8 wayland: Use release for display and seat objects, if available
wl_seat and wl_output gained release methods, which should be preferred over destroy methods if they are available.

Bumps wl_output to version 3.
2023-04-05 10:24:23 -04:00