Commit Graph

15803 Commits

Author SHA1 Message Date
Anonymous Maarten dd0bb25f66 cmake: remove SDL_STATIC_PIC cmake option.
Use CMAKE_POSITION_INDEPENDENT_CODE instead
2024-06-10 18:04:18 +02:00
Sam Lantinga 4ce4fc575a Fixed mapping between Apple YUV formats and SDL formats
Fixes https://github.com/libsdl-org/SDL/issues/10001
2024-06-10 08:59:21 -07:00
Sam Lantinga 4fc68a48f2 Keep track of whether a controller was a gamepad
Fixes https://github.com/libsdl-org/SDL/issues/9996
2024-06-09 17:45:20 -07:00
Sam Lantinga 20fccdabf4 Fixed crashes when passed a NULL hashtable 2024-06-09 17:45:20 -07:00
Ryan C. Gordon 8ddf05855b
iostream: clarified SDL_IO_STATUS_READY documentation. 2024-06-09 13:21:31 -04:00
Sam Lantinga 3e018517c3 Fixed build errors after SDL_IOWhence change 2024-06-09 11:52:04 -04:00
SDL Wiki Bot 9651ca5918 Sync SDL3 wiki -> header 2024-06-09 05:52:14 +00:00
Ryan C. Gordon 6110405c07
include: Fill in some documentation gaps. 2024-06-09 01:51:30 -04:00
Ryan C. Gordon 7d54a37d74
iostream: Make seeking's `whence` value a real enum. 2024-06-09 01:50:48 -04:00
SDL Wiki Bot 35adef17a8 Sync SDL3 wiki -> header 2024-06-09 05:33:28 +00:00
Ryan C. Gordon 40e8d0155e
SDL_joystick.h: Add some notes to the category documentation. 2024-06-09 01:32:41 -04:00
Ryan C. Gordon 8af58b4bec
SDL_FLT_EPSILON: Updated documentation to be wikiheaders-friendly. 2024-06-08 23:15:21 -04:00
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 1c3090a1ac 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 22c14442e2)
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