Commit Graph

10980 Commits

Author SHA1 Message Date
Anonymous Maarten
1d5d948ccf Fix building SDL3 without dialog support 2024-12-08 14:31:19 +00:00
Marcin Serwin
b5c05b6e29 wayland: pass actual empty strings to zenity
The double quotes were passed literally to the zenity arguments which
resulted in the message box displaying literal `""` when no text was
given. The empty string is more logical in this case, e.g., the empty
title results in the message box having lesser height.
2024-12-07 15:19:26 -08:00
Marcin Serwin
1e7c7c69c5 wayland: handle 0 extra buttons in message box
When no extra buttons are passed to zenity with `--question --switch`
arguments it fails to show anything, however, SDL3 still reports
success. To handle this case, we pass an additional "OK" button.
2024-12-07 15:19:26 -08:00
Salman Alshamrani
972c6d0b82 Add SetTextInputProperties to video device API and fix iOS handling 2024-12-07 11:43:35 -08:00
Salman Alshamrani
5d09656afa Refactor iOS text input activation to better work with hardware keyboards 2024-12-07 11:43:35 -08:00
Salman Alshamrani
72895a6994 Remove unused hardwareKeyboard variable 2024-12-07 11:43:35 -08:00
Sam Lantinga
caf0348b26 Enable ApplePressAndHoldEnabled
Fixes https://github.com/libsdl-org/SDL/issues/3622
2024-12-06 17:33:10 -08:00
Sam Lantinga
900627f7fc Enable the SDL_HINT_MOUSE_DOUBLE_CLICK_TIME and SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS hints on macOS
Fixes https://github.com/libsdl-org/SDL/issues/4000
2024-12-06 17:07:16 -08:00
Sam Lantinga
846eb9a886 Added SDL_RenderTextureAffine() to the exported API 2024-12-06 14:16:16 -08:00
expikr
d0f1910918 add SDL_RenderTextureAffine 2024-12-06 14:14:47 -08:00
Evan Hemsley
fa5f84fb6e GPU: Add SetGPUAllowedFramesInFlight (#11599) 2024-12-06 11:56:20 -08:00
Sam Lantinga
ffb9b30e84 The metal renderer doesn't actually support RGB texture formats
Fixes https://github.com/libsdl-org/SDL/issues/11576
2024-12-06 09:47:50 -08:00
Ozkan Sezer
d1b8fcd692 work around type redefinition errors in SDL_immdevice.h 2024-12-06 17:51:00 +03:00
Lucas Murray
9b82d46259 GPU: Use correct logging category 2024-12-06 07:53:37 -05:00
Lucas Murray
5229b520af GPU: Log D3D12 driver version 2024-12-05 21:49:42 -08:00
Semphris
7ddda4fe18 Add system theme support for Emscripten 2024-12-05 20:01:56 -08:00
Sam Lantinga
3060105cfa Don't filter out controllers when launched by Steam under Proton
Fixes https://github.com/libsdl-org/SDL/issues/11579
2024-12-05 19:50:15 -08:00
Frank Praznik
2e5208f353 kmsdrm: Fix Vulkan type redefinition errors from commit 24ed947cc3 2024-12-05 19:52:19 -05:00
Sam Lantinga
23828b62d4 Added SDL_IsMainThread() and SDL_RunOnMainThread() 2024-12-05 13:53:51 -08:00
Sam Lantinga
fffa6c7a2b Add missing include of fcntl.h
Fixes https://github.com/libsdl-org/SDL/issues/11590
2024-12-05 13:45:17 -08:00
Sam Lantinga
235e5c6a6c Fixed crash if a device doesn't have a USB product or manufacturer string
This happens with the Razer Huntsman V3 Pro Tenkeyless keyboard
2024-12-05 10:42:02 -08:00
Ryan C. Gordon
9784e10a75 audio: Let emscripten update device->sample_frames at device open time.
Fixes #11435.
2024-12-04 19:16:28 -05:00
Ozkan Sezer
5bfece34f9 ran gendynapi.pl after PR/11170. 2024-12-05 02:28:50 +03:00
Semphris
a4852f3a10 SDL_ShowFileDialogWithProperties with more options 2024-12-04 15:10:15 -08:00
Lucas Murray
dc5a2ddfd0 GPU: Forward D3D12 validation warnings to the SDL log 2024-12-04 14:34:43 -08:00
Lucas Murray
efb59bd0bf GPU: Fix validation warning in D3D12 blit code 2024-12-04 12:35:36 -08:00
Caleb Cornett
45869d6177 GPU: Vulkan requires drawIndirectFirstInstance feature (#11583) 2024-12-04 15:05:35 -05:00
Caleb Cornett
d8eb68a6c5 GPU: Clean up D3D12 blit shader compilation 2024-12-04 14:56:36 -05:00
Frank Praznik
24ed947cc3 kmsdrm: Fix an LTO type mismatch warning
Include SDL_kmsdrmopengles.h before SDL_kmsdrmvulkan.h, as the Vulkan header can pull in Wayland headers, which pull in EGL headers with EGL types defined as Wayland types, which causes warnings when building with strict-aliasing and LTO.
2024-12-04 12:34:02 -05:00
Frank Praznik
31128b6cdd kmsdrm: Clean up GLES function definitions
Several functions were redundantly declared in both in the general subsystem header and the GLES header, and some signatures didn't match in both locations.

Move them all to the GLES header, as the definitions are in the GLES source file.
2024-12-04 12:34:02 -05:00
numzero
123306b18c X11: support _NET_WM_SYNC_REQUEST 2024-12-04 11:59:46 -05:00
expikr
d320d7143d Fix rawmouse wrong timestamp (#11553)
Currently, the rawinput thread incorrectly spreads the timestamps over idle time if the poll interval is less than 100ms, and abruptly switches to lumping all accumulated inputs to happen simultaneously if it exceeds 100ms.

This means that any game which implements retroactive event handling based on timestamps will jarringly snap between the two polar opposite extremes of incorrect behaviour.

This PR replaces the arbitrary 100ms threshold with logic based on measuring the idle start and end time.

If the thread idled for more than 125000 nanoseconds, it is considered to have not had any input in its queue before it entered idle, and the events are spread over the interval between thread wake-up and pump finish, with the final input aligned to the pump finish time.

If the thread idled for less than 125000 nanoseconds, it is considered to have events entered at some point between last pump finish and thread entering sleep, and the events are spread over the full pump-to-pump interval.
2024-12-03 20:40:34 -08:00
Ozkan Sezer
830b132cd4 SDL_asyncio_liburing.c: replace __kernel_time64_t use with SDL's Sint64 2024-12-03 23:39:11 -05:00
Ozkan Sezer
4ac78706bf SDL_asyncio_liburing.c: replace size_t casts on pointers with intptr_t 2024-12-03 23:39:11 -05:00
Sam Lantinga
1377cdb3f2 Fix the Indonesian language code on Android 2024-12-03 15:04:29 -08:00
Ryan C. Gordon
46f43c2e6e asyncio: Remove SDL_AsyncIOTask from the public API. 2024-12-03 17:32:20 -05:00
Ryan C. Gordon
4745aa3324 asyncio: Windows IoRing support, other tweaks and fixes. 2024-12-03 17:32:20 -05:00
Ryan C. Gordon
3ca629ceb5 asyncio: Allow file closes to request a flush/fsyncdata. 2024-12-03 17:32:20 -05:00
Ryan C. Gordon
022a6a9f97 asyncio: Added Linux io_uring support. 2024-12-03 17:32:20 -05:00
Ryan C. Gordon
e79ce2a200 asyncio: Added async i/o APIs. 2024-12-03 17:32:20 -05:00
Sam Lantinga
6aab5a089d Fixed potential buffer overflow 2024-12-03 08:33:51 -08:00
Ryan C. Gordon
65c9a58f5e audio: Make sure a few bitflag checks convert to bools correctly.
This might just be defensive coding, but better safe than sorry on this.
2024-12-03 11:04:52 -05:00
Anonymous Maarten
ec2ef5f9b5 dynapi: order headers for reproducible behavior 2024-12-02 18:25:48 +01:00
Frank Praznik
2762644e96 video: Don't error when setting an unbounded max window size while a minimum is set
If the maximum size was changed to 0 (unbounded) while a minimum was set, the sanity check ensuring that the max size isn't less than the minimum size would incorrectly cause the operation to error out.
2024-12-02 09:55:19 -05:00
Ryan C. Gordon
ce573b01f8 audio: Added SDL_IsAudioDevicePhysical and SDL_IsAudioDevicePlayback.
Fixes #11529.
2024-11-29 17:31:37 -05:00
Ryan C. Gordon
f5ad66ef4b audio: Allow channel maps to specify -1 to mute a channel.
Fixes #11373.
2024-11-28 00:00:30 -05:00
Ryan C. Gordon
f852038384 filesystem: Added SDL_GetCurrentDirectory().
Fixes #11531.
2024-11-27 23:42:11 -05:00
Ivan Epifanov
b8233aff8e Vita: implement mousewheel and buttons 4/5 2024-11-27 08:23:16 -08:00
Frank Praznik
bbc9c75618 x11: Fix memory leaks in clipboard event handler
XGetWindowProperty and XGetAtomName return data which must be freed by the client, and was being leaked.
2024-11-26 10:54:59 -05:00
Caleb Cornett
5c8bed3780 GPU: Fix D3D12 tearing query 2024-11-25 22:33:48 -05:00