Mathieu Eyraud
86da08b0be
Zero-initialize SDL_GPUDevice
2025-10-01 07:22:17 -07:00
Mathieu Eyraud
409bb7722c
Fix uninitialized variables
2025-10-01 07:21:44 -07:00
Mathieu Eyraud
a05aca51ec
Fix condition for setting HDR properties
2025-08-04 23:02:25 -04:00
Mathieu Eyraud
5de3d1e9cc
Fix error handling of SDL_AddHintCallback
2024-08-11 06:59:10 -07:00
Mathieu Eyraud
45bfa8e5e7
Fix xsettings list copy
...
If there is only 1 element in the list or memory allocation fails on the 2nd iteration then new->next is uninitialised.
2024-08-11 06:58:03 -07:00
Mathieu Eyraud
dcc3dd4c7c
Remove stray return statement
2024-08-11 06:57:01 -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
Mathieu Eyraud
cac1434295
Close pipe in Wayland_ShowMessageBox
...
When closing message box by pressing escape, Zenity does not write to the pipe and fgets() get stuck waiting for EOF.
2024-04-17 15:27:34 -04:00
Mathieu Eyraud
29d43272e2
Fix memory leak in WIN_GetMonitorPathInfo
2024-04-15 03:24:09 -10:00
Mathieu Eyraud
4d00706f57
Do not store pointer before potentialy freeing it
...
Store data to windows->driverdata after call to SetProp() in case it fails.
2024-03-30 11:07:42 -07:00
Mathieu Eyraud
36dec0bf4e
Fix return value of WIN_GetMonitorPathInfo
2024-03-30 11:04:32 -07:00
Mathieu Eyraud
6af979975f
Add missing break
2024-03-18 15:55:14 +03:00
Mathieu Eyraud
751917cb6f
Fix null pointer dereference in SDL_BindAudioStreams()
2024-02-20 15:14:07 -05:00
Mathieu Eyraud
36b2d2e463
Fix memory leak in SDL_SendDrop()
2023-11-10 06:32:43 -08:00
Mathieu Eyraud
dfb87e1099
Fix uninitialised variable 'properties'
...
If SDL_CreateHashTable() fails, properties->lock is not initialised, SDL_FreeProperties() is called and destroys the uninitialised lock.
2023-11-10 06:32:15 -08:00
Mathieu Eyraud
e54c5e0204
Fix condition in SDLTest_TrackAllocations()
2023-11-10 06:31:44 -08:00
Mathieu Eyraud
f30392da5b
Fix assertion in LINUX_JoystickSetSensorsEnabled()
...
Calling LINUX_JoystickSetSensorsEnabled() after the joystick is unplugged will trigger this assertion.
2023-10-05 13:06:48 -07:00
Mathieu Eyraud
0eb8651d5e
Do not report gyro/accelerometer if we can't read axes info
2023-10-04 08:43:39 -07:00
Mathieu Eyraud
39c2f97373
Fix NULL dereference in SDL_OpenAudio
2023-09-18 09:44:59 -04:00
Mathieu Eyraud
94b3f78c44
Fix out of bound read of 'has_hat' array
2023-08-10 08:25:01 -07:00
Mathieu Eyraud
2b0c0f5b6b
Don't pass NULL to strncmp
2023-08-05 18:17:21 -04:00
Mathieu Eyraud
778e8185cd
Fix size of memcpy in SDL_AudioDeviceFormatChangedAlreadyLocked
...
And add diagnostic that allows to find this kind of issue in clang-tidy
2023-08-05 14:14:45 -04:00
Mathieu Eyraud
0500fca00c
Add missing break
2023-07-29 10:29:00 -04:00
Mathieu Eyraud
a4f3905bb6
Fix uninitialised variable
2023-07-08 08:36:36 -07:00
Mathieu Eyraud
bcf239e413
Improve sensor detection for Linux gamepad v2
...
Detecting by name such as "Accelerometer and "Motion Sensor" may be too broad.
Sensors on Dualshock and Switch gamepad are correctly detected by SDL_EVDEV_GuessDeviceClass().
Use vendor and product ID for Wii extension controls.
2023-07-07 10:57:45 -07:00
Mathieu Eyraud
62ed6f453f
Use SDL_strdup instead of strdup
2023-06-15 06:31:19 -07:00
Mathieu Eyraud
fa5475ba9f
Fix joystick instance id check
2023-01-02 09:04:18 -08:00
Mathieu Eyraud
ea6f0ae683
Fix use after free in SDL_GetGamepads
2023-01-02 09:03:49 -08:00
Mathieu Eyraud
721ece7ba0
Fix memory leak in SDL_SW_CreateYUVTexture
2023-01-02 10:22:44 +01:00
Mathieu Eyraud
b8af865f18
Fix candidate list size for Windows IME
...
Adjust candidate count so list is not draw bigger that needed. This also fix potential uninitialised read of variable `candsize[i]` if `vertical` is false.
2022-08-28 06:27:24 -07:00
Mathieu Eyraud
c6c688ab01
Add SDL_JOYBATTERYUPDATED event to SDL_JoystickEventState()
2022-08-14 07:00:12 -07:00
Mathieu Eyraud
f1390780ca
Fix use after free when removing Windows audio device
2022-08-02 10:24:11 -04:00
Mathieu Eyraud
59a104b803
Do not pass NULL to memcpy
...
ReadJoyConControllerType calls WriteSubcommandSync with pbuf=NULL
2022-08-02 06:38:51 -07:00
Mathieu Eyraud
42b2320756
Fix memory leak of children for combined JoyCon
2022-08-02 06:33:18 -07:00
Mathieu Eyraud
00b95e989b
Fix read of uninitialised variable
...
If the condition (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_STRING) is false, subtext is not initialised.
2022-06-18 18:23:50 +03:00
Mathieu Eyraud
fe46569cce
Fix potential memory leak in SDL_AddHintCallback
2022-05-21 09:47:34 -07:00
Mathieu Eyraud
0b2a55ea7d
Fix typo
2022-04-25 15:46:17 -07:00
Mathieu Eyraud
99ae6395b1
Initialise scandir argument
...
'scandir' does not initialise 'entries' on error
2022-04-12 11:14:07 -04:00
Mathieu Eyraud
1db47d468a
Fix potential memory leak in QueueCmdFillRects
2022-03-28 08:34:32 -07:00
Mathieu Eyraud
2a0cde8fd5
Always send SDL_WINDOWEVENT_SIZE_CHANGED when window is resized
...
SDL_WINDOWEVENT_SIZE_CHANGED is now sent even if the resulting size of the window does not match the requested size.
2022-01-16 08:49:48 -08:00
Mathieu Eyraud
02021ae753
Return capabitlities from RawInput joystick
2021-11-27 07:26:10 -05:00
Mathieu Eyraud
5fc7a90a8b
Fix refcounting in SDL_hid_exit
2021-11-12 01:25:15 -08:00
Mathieu Eyraud
3090812e1e
Convert last SDL_IOReady()'s 2nd parameter to flags
...
Conversion missed in https://github.com/libsdl-org/SDL/pull/4897
2021-11-11 06:17:26 -08:00
Mathieu Eyraud
8e604a5f12
Fix error handling in X11_SetWindowTitle
...
X11_XChangeProperty return 1 on success.
2021-07-25 14:51:33 -07:00
Mathieu Eyraud
a5825576fb
Fix error handling of wayland message box
...
Zenity return a small integer on success which may be the same as EXIT_FAILURE. Use a bigger integer for error reporting from child process.
2021-04-21 09:53:39 -04:00
Mathieu Eyraud and Ethan Lee
12dd412b0b
Fix icon of wayland message box
...
Also add some comments and silence a warning.
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com >
2021-04-21 09:53:39 -04:00
Mathieu Eyraud
7a2b6f331b
Guard Inotify stuff with macro
...
This fix implicit declaration of close and unused variable warning.
2021-02-22 09:07:07 -08:00
Mathieu Eyraud
8481229ff7
Fix error handling in KMSDRM_AddDisplay
...
Add missing `goto cleanup` and check that `dispdata` is not NULL before dereferencing it.
2021-02-22 09:01:36 -08:00
Mathieu Eyraud
2df9c15e96
Fix memory leak in KMSDRM_Vulkan_CreateSurface
...
Variable `device_props` is never freed.
2021-02-22 09:00:45 -08:00
Mathieu Eyraud
844d5e3ed3
Fix memory leak in ConnectSensor
...
'name' is leaked in case of error.
2021-02-21 16:46:20 -08:00