15791 Commits

Author SHA1 Message Date
Green Sky
997dd3e6eb reword SDL_FlashWindow params
so they link the types in the wiki
2024-06-08 17:25:27 -04:00
Frank Praznik
7a7d780289 wayland: Fix broken dead key behavior
This fixes numerous problems regarding dead keys on Wayland. Most notably, Wayland was enforcing dead keys on SDL_KEYDOWN and SDL_KEYUP events, which caused unresponsiveness on keys that were mapped to dead keys (tilde on US-Intl is most notable for this, commonly used as a console key).

When starting text input, not all state was reset properly. The text input protocol requires to be re-enabled every time text input changes, which SDL did not do. Also, XKB compose state was not reset at all, causing composite and dead keys to carry over from when text input was disabled.

Manual cherry-pick of 1c3090a1acee9c74bf8499d8c1ef0b0f317d3110 by Hanicef
2024-06-08 12:00:30 -04:00
Anthony
e9982bf1b5
Filter Android drivers according to SDL_***_DISABLED macros to help reduce APK size (#9986) 2024-06-08 08:55:15 -07:00
Sam Lantinga
e69272344c Added documentation for SDL_FLT_EPSILON (thanks @MrOnlineCoder!)
Closes https://github.com/libsdl-org/sdlwiki/pull/549
2024-06-08 08:29:17 -07:00
Fabrice Desclaux
f62a1bed16 Fix spurious LCtrl on RAlt key pressed
(cherry picked from commit 22c14442e22b432c69348211fc97c81248269d30)
2024-06-07 09:21:40 -07:00
SDL Wiki Bot
9a4fc81bff Sync SDL3 wiki -> header 2024-06-06 17:59:48 +00:00
Sam Lantinga
5701c4f4bc Added migration documentation for iOS window properties
Fixes https://github.com/libsdl-org/SDL/issues/9430
2024-06-06 10:59:15 -07:00
Sam Lantinga
1938d25b7e Use "%S" format specifier for wide-character strings 2024-06-06 10:59:15 -07:00
Sam Lantinga
2a8f87d34b Fixed build warnings 2024-06-06 10:59:15 -07:00
SDL Wiki Bot
a5356f9b45 Sync SDL3 wiki -> header 2024-06-06 17:08:43 +00:00
Sam Lantinga
23db1062fc Document that you can pass NULL to SDL_PeepEvents()
Fixes https://github.com/libsdl-org/sdlwiki/issues/547
2024-06-06 10:08:20 -07:00
kanjitalk755
7547d80c05 Add SDL_PIXELFORMAT_XRGB8888 and SDL_PIXELFORMAT_XBGR8888 to SDL_render_metal.m 2024-06-06 09:57:35 -07:00
Oleg
7529b4bed5 Added VRS DirectForce Pro wheelbase VID/PID to wheel devices list 2024-06-06 09:53:39 -07:00
Sam Lantinga
b6d7adfec1 Fixed PlayStation detection interrupting input for the Logitech K400 keyboard
Also added the Logitech Chillstream to the list of PS3 controllers and fixed the right shoulder axis.
2024-06-05 19:11:10 -07:00
Anthony
3c5b1b52ac Update proguard-rules.pro for recent haptic changes 2024-06-05 14:54:42 -07:00
Sam Lantinga
27728db41d Sort joystick drivers in Android.mk 2024-06-05 12:08:29 -07:00
Sam Lantinga
69bfa5c951 Build the dummy joystick driver on Android
Fixes https://github.com/libsdl-org/SDL/issues/9978
2024-06-05 12:07:31 -07:00
Sam Lantinga
26fc7a8060 Fixed signatures for internal haptics functions 2024-06-05 10:09:02 -07:00
Sam Lantinga
f879411627 Added support for gamepad rumble on Android
Tested with the DualSense controller over Bluetooth on Android 12

Fixes https://github.com/libsdl-org/SDL/issues/7847
2024-06-05 09:53:56 -07:00
erysdren
0c3dcdf4a3
Add a basic ShowMessageBox implementation for PSP (#9932) 2024-06-05 07:42:22 -07:00
Frank Praznik
a422dfe572 video: Don't attempt to apply window flags to popup windows when the window is shown
None of the operations are valid on popup windows and will just set an error.
2024-06-05 09:39:31 -04:00
Sam Lantinga
7b14fcb4d9 Stack allocation never happened, so explicitly allocate the path 2024-06-05 05:48:39 -07:00
Sam Lantinga
4836fd1e70 Fixed crash if a file can't be opened on Android 2024-06-05 05:48:21 -07:00
Sam Lantinga
9b2debb131 Renamed old function reference 2024-06-04 22:25:37 -07:00
Sam Lantinga
ce65f84fd8 Fixed Android warnings 2024-06-04 16:38:32 -07:00
Hunter Kvalevog
5387022855 camera: Initialize AVCaptureVideoDataOutput.videoSettings to zero
AVCaptureVideoDataOutput.videoSettings should be initialized to zero to
receive frames matching the device format.

See: https://developer.apple.com/documentation/avfoundation/avcapturevideodataoutput/1389945-videosettings?language=objc
2024-06-04 16:24:27 -07:00
Hunter Kvalevog
14f7eebac6 testcamera: Add [--camera name] parameter 2024-06-04 16:24:27 -07:00
Wouter Wijsman
a3adc41f79 PSP: Add on-screen keyboard support 2024-06-04 14:31:05 -07:00
Wouter Wijsman
25e41df4db
Merge pull request #9961 from erysdren/psp-renderer-crash
SDL_render_psp.c: Fix crash in PSP_DestroyRenderer()
2024-06-04 23:27:57 +02:00
Sam Lantinga
4d392bfc67 Fixed camera capture on iOS
My phone captured 1920x1080 images even though the highest reported format was higher resolution, so I adjusted testcamera to be able to handle different sized images than expected.

Fixes https://github.com/libsdl-org/SDL/issues/9930
2024-06-04 11:34:39 -07:00
Sam Lantinga
7e231fcd90 Added testcamera to Xcode test apps 2024-06-04 10:43:45 -07:00
Sam Lantinga
b1529699cf Fixed Xcode build after adding offscreen Vulkan support 2024-06-04 10:43:20 -07:00
Sam Lantinga
60396971ce Move the main header with SDL_MAIN_USE_CALLBACKS 2024-06-04 10:42:44 -07:00
David Gow
5eeeaf4780 render: Mark an already-destroyed renderer as freed
It's possible to destroy an SDL_Renderer without freeing it using
SDL_DestroyRendererWithoutFreeing(), which is used to make it possible
to destroy windows and their renderers in either order. However, if a
renderer has already been destroyed before it is freed (e.g., the window
was destroyed before the renderer), the object is never marked invalid.
This means the SDL_Renderer is reported as leaked, even if
SDL_DestroyRenderer() is called.

SDL_GetWindowSurface() will trigger this, as the window texture is
cleaned up _after_ the window destroys its associated renderer. This
makes it impossible to use SDL_FRAMEBUFFER_ACCELERATION without
triggering a leak warning.

Fix this by unconditionally marking the SDL_Renderer object as invalid
in SDL_DestroyRenderer().
2024-06-04 07:50:46 -07:00
Mathieu Eyraud
43c2b42517 Fix stack address escape in SDL_CameraDevicePermissionOutcome()
If allocation of 'p' fails, 'pending_tail' points to 'pending'.
2024-06-04 07:49:07 -07:00
Mathieu Eyraud
c226630086 Fix memory leak in SDL_IOFromFile()
If Android_JNI_FileOpen() or windows_file_open() fail, SDL_CloseIO(iostr) does nothing because 'iostr' is NULL and 'iodata' is leaked.
2024-06-04 07:48:25 -07:00
Sam Lantinga
470cfc2755 Make sure we set the initial report interval value 2024-06-04 07:47:34 -07:00
meyraud705
4c9a91b62e Update gamepad sensor rate
SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL allows to change sensor rate. Make SDL_GetGamepadSensorDataRate() returns the updated value.
2024-06-04 07:38:48 -07:00
SDL Wiki Bot
e5101ebae6 Sync SDL3 wiki -> header 2024-06-04 04:11:34 +00:00
Sam Lantinga
a0d1445ccb Replaced SDL_GetRendererInfo() with SDL_GetRendererName()
The texture formats are available via the SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER property

Fixes https://github.com/libsdl-org/SDL/issues/9851
2024-06-03 21:10:58 -07:00
Ozkan Sezer
ca28bcb3b8 hidapi/windows/hid.c: avoid warnings with gcc < 8. 2024-06-04 06:10:24 +03:00
SDL Wiki Bot
74c9c9a325 Sync SDL3 wiki -> header 2024-06-04 01:23:30 +00:00
Semphris
8c8ee2174d Dialog: Add filter number, remove NULL termination 2024-06-03 18:22:26 -07:00
Sam Lantinga
3e70964ae2 Updated docs to note that SDL_GetAudioDeviceName() now returns const char * 2024-06-03 17:42:53 -07:00
Sam Lantinga
1d83b782b8 Set the headphones to 50% volume to avoid blasting people's ears
Also fixed audio routing comments
2024-06-03 17:28:32 -07:00
Sam Lantinga
8aa7910184 Added an example of setting PS5 controller audio routing
Closes https://github.com/libsdl-org/SDL/pull/9661
2024-06-03 17:24:36 -07:00
erysdren
b867db4d54 SDL_render_psp.c: Fix crash in PSP_DestroyRenderer() 2024-06-03 17:33:51 -05:00
Sam Lantinga
a9a51cebde Disable raw keyboard input by default
It interferes with keyboard hooks and most applications don't expect key events coming from another thread
2024-06-03 14:43:46 -07:00
Sam Lantinga
73879ef26e Only register for the type of raw input requested by the application 2024-06-03 14:43:46 -07:00
Anonymous Maarten
a919774fe4
Build with -Wfloat-conversion + fix all warnings 2024-06-03 21:33:29 +00:00