Sam Lantinga
b566bfce07
Fixed warning C4152: nonstandard extension, function/data pointer conversion in expression
2024-01-19 06:49:53 -08:00
Sam Lantinga
a31dc6dfcb
Switched SDL_TouchID and SDL_FingerID to be Uint64 with 0 being an invalid value
2024-01-18 10:55:24 -08:00
Sam Lantinga
a2665f54c8
Updated the atomic API for SDL 3.0 naming conventions
...
Fixes https://github.com/libsdl-org/SDL/issues/7388
2024-01-18 04:41:34 -08:00
Sam Lantinga
a0967c017f
Fixed building with the video subsystem disabled
2024-01-17 09:24:04 -08:00
chalonverse
3a4ac15a27
Make Xbox GDK code public (and fix some GDK code rot) ( #8844 )
2024-01-14 20:31:41 -08:00
Caleb Cornett
d766f68cb3
Fix compile error with XInputOnGameInput.h
2024-01-10 12:51:27 -08:00
Sam Lantinga
1a13dae219
Added constant definitions for SDL properties
...
Fixes https://github.com/libsdl-org/SDL/issues/8622
2024-01-07 16:59:41 -08:00
Sam Lantinga
3deefa6b43
Updated documentation for SDL_HINT_SHUTDOWN_DBUS_ON_QUIT
2024-01-07 14:20:16 -08:00
Semphris
2348e8b6a2
Add hint to make SDL handle dbus_shutdown()
2024-01-07 14:11:33 -08:00
Sam Lantinga
014a63b4b5
Renamed ShowTextInput/HideTextInput to ShowScreenKeyboard/HideScreenKeyboard on Android
...
This better reflects the actual implementation and makes SDL_HINT_ENABLE_SCREEN_KEYBOARD work on Android.
Fixes https://github.com/libsdl-org/SDL/issues/8652
2024-01-06 08:11:22 -08:00
Sam Lantinga
5b3ee51c6c
Updated copyright for 2024
2024-01-01 13:15:26 -08:00
Tyson Whitehead
6daf2e943f
Try SDL_UDEV_deviceclass to detect joysticks even if in a container
...
The udev container issue is mostly to do with device notifications
and netlink. The device classification stuff just pokes file in /sys
and /run/udev. Doesn't hurt to try it first for classifying joysticks
and then fall to the guess heuristics if it fails.
2023-12-24 22:39:16 -08:00
Dimitriy Ryazantcev
08a7ca4d53
XInput: Use XInputGetCapabilitiesEx instead of fragile GuessXInputDevice
...
XInputGetCapabilitiesEx (ordinal 108) is available in XInput 1.4 that is shipped with Windows 8 and newer.
2023-12-17 08:32:10 -08:00
Sam Lantinga
8c285828e5
Fixed return value for SDL_UDEV_AddCallback()
...
Fixes https://github.com/libsdl-org/SDL/issues/8694
2023-12-15 10:06:01 -08:00
Sam Lantinga
53cda988f4
Clear any errors from a previous run
...
The error is thread-local, and the java thread may run onCreate initialization multiple times depending on the Android life cycle
2023-12-07 14:30:40 -08:00
Sam Lantinga
fe6b3ab0b0
Fixed warning C6031: Return value ignored: 'CLSIDFromString'.
2023-12-05 09:31:13 -08:00
Ryan C. Gordon
447b508a77
error: SDL's allocators now call SDL_OutOfMemory on error.
...
This means the allocator's caller doesn't need to use SDL_OutOfMemory directly
if the allocation fails.
This applies to the usual allocators: SDL_malloc, SDL_calloc, SDL_realloc
(all of these regardless of if the app supplied a custom allocator or we're
using system malloc() or an internal copy of dlmalloc under the hood),
SDL_aligned_alloc, SDL_small_alloc, SDL_strdup, SDL_asprintf, SDL_wcsdup...
probably others. If it returns something you can pass to SDL_free, it should
work.
The caller might still need to use SDL_OutOfMemory if something that wasn't
SDL allocated the memory: operator new in C++ code, Objective-C's alloc
message, win32 GlobalAlloc, etc.
Fixes #8642 .
2023-11-30 00:14:27 -05:00
Dimitriy Ryazantcev
9faa7977bd
UWP: Add support for supplementary Unicode characters input
...
Characters outside Basic Multilingual Plane (BMP) are coded as so called "surrogate pair" in two separate UTF-16 character events.
2023-11-28 12:33:21 -08:00
Dimitriy Ryazantcev
9a206adbee
UWP: Use Windows.UI.Core.CoreDispatcher.AcceleratorKeyActivated event for keyboard
...
Only in this case we can see Left Alt and Right Alt keys.
Stole the idea from DirectXTK12 repo:
https://github.com/microsoft/DirectXTK12/blob/main/Src/Keyboard.cpp
2023-11-28 11:31:19 -08:00
Sylvain
6bb40f1d8d
SDL_VideoCapture: allow add/remove device at runtime on linux
2023-11-27 16:01:10 -05:00
Ryan C. Gordon
3264e64738
SDL_RunApp: Make sure argc/argv are stable if the caller didn't define them.
...
Fixes #8246 .
2023-11-22 17:34:39 -05:00
Sam Lantinga
0907f345cb
Added property types: pointer, string, number, float
2023-11-12 10:48:38 -08:00
Sylvain Becker
04b6b2979f
Re-add SDL_assert() with non boolean ptr syntax ( #8530 )
2023-11-11 12:28:24 +03:00
Sylvain
d8600f717e
Pointer as bool (libsdl-org#7214)
2023-11-09 14:18:36 -08:00
Sam Lantinga
3ab98a3572
Removed debug print statements (thanks @stsp!)
2023-11-08 20:43:44 -08:00
Sam Lantinga
f4b61fff30
Implemented VT switching for KMSDRM on Linux
...
Fixes https://github.com/libsdl-org/SDL/issues/3844
2023-11-08 20:35:16 -08:00
Sam Lantinga
fd4a2cce9e
SDL_syswm.h has been removed and replaced with window properties
2023-11-08 12:01:48 -08:00
Sam Lantinga
a4c6b38fef
Fixed FreeBSD build
2023-11-08 07:46:02 -08:00
Sam Lantinga
d9e6dcc650
Fixed FreeBSD build
2023-11-08 04:45:29 -08:00
Sam Lantinga
7cc3e94eb2
Store the requested muted state
2023-11-08 03:36:47 -08:00
Sam Lantinga
ce9e1bd324
Don't mute the console input if we can't read the keyboard
...
This makes sure you can hit Ctrl-C if you don't have permission to access the raw keyboard device.
Fixes https://github.com/libsdl-org/SDL/issues/4812
2023-11-08 03:29:10 -08:00
Ryan C. Gordon
c53843a961
docs: Remove Doxygen \brief tags.
...
Doxygen and the wiki bridge don't need them; they'll both just use the first
line/sentence instead.
Fixes #8446 .
2023-11-06 10:26:06 -05:00
Sam Lantinga
bc3d9e99f3
Only save ibus_addr_file after we've successfully read an address from it.
...
Fixes https://github.com/libsdl-org/SDL/issues/3359
2023-11-05 22:12:37 -08:00
Sam Lantinga
d3f2eb2aba
Use XINPUT_STATE instead of XINPUT_STATE_EX (thanks Andrew!)
...
XINPUT_STATE_EX isn't actually a thing, we can just use the normal XINPUT_STATE
Fixes https://github.com/libsdl-org/SDL/issues/2797
(cherry picked from commit e8f4045d0b )
2023-11-04 22:28:09 -07:00
Sam Lantinga
91f0456391
Add the source application for drag and drop events (thanks Nathan!)
...
This is only implemented on iOS, but is useful for third party application integrations.
Fixes https://github.com/libsdl-org/SDL/issues/2024
2023-11-04 13:00:41 -07:00
Sam Lantinga
7e445da569
Added SDL_CleanupEvent()
...
This is used to free any dynamically allocated memory in events.
2023-11-04 06:47:24 -07:00
Sam Lantinga
f3261fedcc
Code cleanup now that SDL_bool is equivalent to a C boolean expression
2023-11-03 09:54:04 -07:00
Ryan C. Gordon
f63e9a8a3f
wasapi: Handle disconnected devices that get reconnected.
...
The device ID strings don't change between connects, so we need to move the
old device object out of the way if it still exists as a zombie, and let
the reconnected device get itself a fresh object.
2023-10-27 01:30:27 -04:00
Ryan C. Gordon
5fa7b291d4
wasapi: Fixed memory leak if new audio devices fail to add.
2023-10-27 01:30:13 -04:00
Ryan C. Gordon
468c386686
wasapi: Handle disconnect notifications from the management thread, too.
...
These are also pretty heavyweight, don't do them from the notification
thread, which can deadlock everything.
2023-10-27 01:28:51 -04:00
Ryan C. Gordon
9bec57309c
wasapi: Proxy default device change handling to management thread.
...
This does a ton of work that can deadlock, because several crucial WASAPI
things that we want to do in response to this will block until the
notification callback has returned, so we can't call them from the handler
directly, or we'll be waiting until the thing that called us returns.
2023-10-26 23:03:27 -04:00
Sam Lantinga
a844d90942
Add missing error reporting in Android_JNI_FileOpen()
...
Fixes https://github.com/libsdl-org/SDL/issues/8427
2023-10-23 08:27:57 -07:00
Anonymous Maarten
25ce87979d
Always provide an implementation for all SDL3 symbols
2023-10-12 14:00:47 +02:00
Ryan C. Gordon
482c238953
aaudio: Deal with device recovery.
...
Android claims to work with multiple devices, but doesn't actually appear to
(at least, afaict), and it will report tons of devices that all just seem
to play to the current default output, so for now, turn this off and only
expose a default device.
And then, with that default output, attempt to recover on errors by throwing
away the current AAudioStream and building a new one.
This let me plug/unplug a set of headphones from the headphone jack and audio
would switch correctly to the new output.
2023-09-30 16:41:31 -04:00
Colin Kinloch
99421b64d0
linux: Add portal drag and drop
2023-09-20 11:41:48 -04:00
Sam Lantinga
c0443e5d12
Fixed crash in SDL_IMMDevice_FindByDevID()
...
Either devid or handle->immdevice_id was NULL, crashing SDL_wcscmp()
2023-09-18 09:47:57 -07:00
Sam Lantinga
233789b0d1
Audio types have the same naming convention as other SDL endian types, e.g. [S|U][BITS][LE|BE]
...
Native endian types have no LE/BE suffix
2023-09-04 09:48:44 -07:00
Ethan Lee
c0cd8c8142
gdk: Add SDL_GDKGetDefaultUser, SDL_GetPrefPath implementation
2023-08-25 10:40:16 -04:00
Sam Lantinga
b903ccf945
SDL_rwops read/write functions return size_t again
...
The current status is stored in the SDL_rwops 'status' field to be able to determine whether a 0 return value is caused by end of file, an error, or a non-blocking source not being ready.
The functions to read sized datatypes now return SDL_bool so you can detect read errors.
Fixes https://github.com/libsdl-org/SDL/issues/6729
2023-08-07 20:36:21 -07:00
Ozkan Sezer
2ba03b4db0
fix build after previous commit.
2023-08-05 18:15:10 +03:00