Ryan C. Gordon
98e9f361a8
winrt: Remove SDL_WinRTGetFSPathUNICODE, rename SDL_WinRTGetFSPathUTF8.
...
Fixes #9470 .
2024-04-13 08:24:12 -04:00
Frank Praznik
60f26182c3
audio: Prefer Pipewire over Pulseaudio if the pipewire-pulse service is running
...
Use DBus to query Systemd to check if the pipewire-pulse service is in the "running" state. If it is, then it is certain that Pipewire is being used instead of Pulseaudio as the preferred system mixer.
If DBus support is not enabled or Systemd is not being used on the underlying system, this check will simply fail and the standard driver order will be tested.
2024-04-11 20:35:10 -04:00
Sam Lantinga
17d4f8d699
Updated to version 3.1.1 for the preview release
2024-04-01 17:03:46 -07:00
Mark Delk
9095cb64c4
linux/SDL_system_theme.c: fix an include path
2024-03-25 17:07:27 -07:00
Sam Lantinga
6443c75eda
Removed SDL_TEXTINPUTEVENT_TEXT_SIZE
2024-03-25 13:26:23 -07:00
Tyson Whitehead
53ade19430
udev: Fix O(n^2) device walking issue ( closes #9092 )
...
I believe there was a O(n^2) device walking issues on startup
- MaybeAddDevice gets called for every device at startup
- MaybeAddDevice calls IsJoystick
- IsJoystick calls SDL_UDEV_GetProductInfo
- SDL_UDEV_GetProductInfo calls udev_enumerate_scan_devices
- udev_enumerate_scan_devices walks all the devices
Prior to commit 3b1e0e1 this was mostly masked as IsJoystick only
called SDL_UDEV_GetProductInfo when a JSIOCGNAME ioctl was
successful. This fixes the O(n^2) behaviour by directly getting
the device via udev_device_new_from_devnum (based on type, major,
and minor number) instead of enumerating everything via
udev_enumerate_scan_devices and matching on name.
2024-03-25 06:45:01 -07:00
Sam Lantinga
36e73bdda4
Updated to version 3.1.0 for the preview release
2024-03-24 06:16:02 -07:00
Sam Lantinga
7852a6c307
Added device name for evdev mice and keyboards
2024-03-23 16:31:00 -07:00
Sam Lantinga
72fc6f86e5
Text input is no longer automatically enabled when initializing video.
...
Fixes https://github.com/libsdl-org/SDL/issues/9309
Fixes https://github.com/libsdl-org/SDL/issues/9268
2024-03-23 16:31:00 -07:00
Sam Lantinga
35756593d6
Use the correct device ID (global or default or specific) based on context
2024-03-23 16:31:00 -07:00
Sam Lantinga
c0f4565552
Added SDL_GetKeyboardName() and SDL_GetMouseName()
2024-03-23 16:31:00 -07:00
Sam Lantinga
d1eb4adb16
Be explicit about the event mouse and keyboard ID
2024-03-23 16:31:00 -07:00
Sam Lantinga
2fe1a6a279
Initial support for hotplugging mice and keyboards
2024-03-23 16:31:00 -07:00
Anonymous Maarten
f59dbf6a12
cmake: add -Wimplicit-fallthrough warning
2024-03-18 20:34:50 +01:00
Ryan C. Gordon
5f64cc511e
rwops: Fixed build on Android.
2024-03-14 19:38:15 -04:00
Ryan C. Gordon
525919b315
rwops: Reworked RWops for SDL3.
...
- SDL_RWops is now an opaque struct.
- SDL_AllocRW is gone. If an app is creating a custom RWops, they pass the
function pointers to SDL_CreateRW(), which are stored internally.
- SDL_RWclose is gone, there is only SDL_DestroyRW(), which calls the
implementation's `->close` method before freeing other things.
- There is only one path to create and use RWops now, so we don't have to
worry about whether `->close` will call SDL_DestroyRW, or if this will
risk any Properties not being released, etc.
- SDL_RWFrom* still works as expected, for getting a RWops without having
to supply your own implementation. Objects from these functions are also
destroyed with SDL_DestroyRW.
- Lots of other cleanup and SDL3ization of the library code.
2024-03-14 19:36:08 -04:00
Semphris
70c2e15615
Add file dialogs
2024-03-14 15:40:25 -07:00
Sam Lantinga
33eaddc565
Cleaned up various type conversion issues
...
This makes sure SDL_PixelFormatEnum flows through the internal code correctly, as well as fixing a number of other minor issues.
2024-03-07 06:58:43 -08:00
meyraud705
c6ec999869
Set udev class for accelerometer
2024-03-03 08:40:24 -08:00
Ryan C. Gordon
e61dfe405f
android: Fixed dead URL in comment.
2024-02-26 11:28:32 -05:00
Sam Lantinga
fee140bdfe
Added the option for GameInput support to the Win32 SDL build
...
GameInput is designed to be used by Win32 C applications, so no need to restrict it to the GDK build.
2024-02-17 14:07:42 -08:00
Nikita Krapivin
534f753e20
GameInput backend for SDL (Gamepad-only for now)
2024-02-17 11:33:51 -08:00
Ozkan Sezer
aae2d22852
Check the SDL_VIDEO_RENDER_??? macros with #if instead of #ifdef
...
Allows users to disable them by defining them as 0.
Closes https://github.com/libsdl-org/SDL/issues/8996
(manual port of https://github.com/libsdl-org/SDL/pull/9063 to SDL3.0)
2024-02-15 20:55:02 +03:00
Ryan C. Gordon
bc984f78bf
android: Remove blocking permission request code. Async only in SDL3!
...
(this actually still blocks at our internal points of usage, though, for
replacement at a later time.)
2024-02-13 12:06:51 -05:00
Ryan C. Gordon
af61cfd5e0
android: Added SDL_AndroidRequestPermissionAsync.
2024-02-13 12:06:51 -05:00
Sam Lantinga
9ce7fe2848
Removed SDL_HINT_ACCELEROMETER_AS_JOYSTICK
...
Sensors are a first-class object in SDL and we haven't gotten any feedback that this feature is useful these days.
Closes https://github.com/libsdl-org/SDL/pull/7879
2024-02-12 09:54:33 -08:00
Sam Lantinga
cacac6cc34
Updated structure and field names for consistency
...
Type names are camel case and field names are snake case except for fields ending in id, which are capitalized.
Fixes https://github.com/libsdl-org/SDL/issues/6955
2024-02-11 08:27:56 -08:00
Sam Lantinga
b7c61569f8
Redefine XINPUT_CAPABILITIES_EX as an SDL typedef
...
mingw-w64 has added this from Proton (which added this from SDL), so we need to re-define it as a local symbol to avoid conflicting with mingw-w64 headers.
Fixes https://github.com/libsdl-org/SDL/issues/9031
2024-02-09 01:26:45 -08:00
Sam Lantinga
d383299779
Fixed build on older Windows SDK
2024-02-01 20:48:53 -08:00
Ryan C. Gordon
1c5bc53738
windows: Manage WideCharToMultiByte vs Windows XP.
...
Reference Issue #8666 .
2024-01-27 20:15:08 -05:00
Ryan C. Gordon
2144c2ac71
windows: Added WIN_IsWindowsXP, for extreme runtime compatibility checks.
...
Reference Issue #8666 .
2024-01-27 20:15:08 -05:00
Ryan C. Gordon
56fa22c63b
windows: OS version checks now cache results.
...
So these only have to talk to the Win32 API once per check, per process.
2024-01-27 20:15:08 -05:00
Sam Lantinga
3b55c7d1f4
Shortened SDL property names
2024-01-27 13:00:50 -08:00
Anonymous Maarten
31d133db40
Define SDL_PLATFORM_* macros instead of underscored ones ( #8875 )
2024-01-24 01:40:51 +00:00
Sam Lantinga
a71f99c71f
Fixed ambiguity between std::byte and byte in rpcndr.h
...
Fixes https://github.com/libsdl-org/SDL/issues/8911
2024-01-23 09:00:02 -08:00
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