15522 Commits

Author SHA1 Message Date
Sam Lantinga
98582dca02 Fixed Win+V handling (pasting from clipboard history) on Windows
Fixes https://github.com/libsdl-org/SDL/issues/9613
2024-04-24 09:35:19 -07:00
Sam Lantinga
30d93fb29b Relax, it's not that exciting :) 2024-04-24 09:19:38 -07:00
Ryan C. Gordon
4a11809370
SDL_TextInputEvent: Note that text field is UTF-8 encoded.
Reference Issue https://github.com/libsdl-org/sdlwiki/issues/516
2024-04-24 11:18:35 -04:00
Petar Popovic
b98116a996 Removing trailing commas in enums in SDL headers
Trailing commas in enums is a C99 feature.
This commit removes them in SDL headers for ANSI compatibility.
2024-04-24 09:44:41 -04:00
Ryan C. Gordon
be6b8dead4
CaseFoldUtf8String: Fixed to actually work with Unicode values.
I think this started off as a UTF-32 output, and I forgot to actually
finish this off to encode back to UTF-8.

Fixes #9607.
2024-04-23 18:57:48 -04:00
Sam Lantinga
8acb91936a Fixed warning, needs more work by @icculus 2024-04-23 14:35:55 -07:00
Sam Lantinga
bcd2807065 Fixed warning C4244: 'initializing': conversion from 'int' to 'SDL_AudioFormat', possible loss of data 2024-04-23 14:12:05 -07:00
Ryan C. Gordon
42579e2af1
docs: Remove README-hg.md
It's been a few years in general, and SDL3 has never been in Mercurial.

We'll leave this document alive in the SDL2 branch, though!
2024-04-23 15:48:29 -04:00
Ryan C. Gordon
30970780a9
include: Fixed some old Doxygen markup to be Markdown instead. 2024-04-23 14:38:04 -04:00
Frank Praznik
7729a8b5c3 x11: Don't try to capture mouse input via X when XInput2 is in use
Trying to capture the pointer via XGrabPointer() when XInput2 is in use will always fail with 'AlreadyGrabbed', since the pointer is already grabbed by XInput2.
2024-04-23 11:59:36 -04:00
Sam Lantinga
42f8e94d11 mac: Fix SDLWindow nswindow member no longer being cleaned up in Cocoa_DestroyWindow
- A refactor changed how SetupWindowData handled external windows where previously it was tracked
  in a field of SDL_CocoaWindowData but now it is tracked by setting SDL_WINDOW_EXTERNAL in the
  window flags. Removed the now unused field and updated the external window check in DestroyWindow.
2024-04-23 06:20:30 -07:00
Ryan C. Gordon
cfabb7a9ac
wikiheaders-options: Clean up header file info a bit more. 2024-04-22 23:54:40 -04:00
Brick
c9cfc681b9 Workaround GCC bug in audio resampler 2024-04-22 18:38:55 -04:00
Ryan C. Gordon
acf811a06b
Revert "dynapi: Remove unused ENABLE_SDL_CALL_LOGGING code."
This reverts commit 9128f92f38aef54a674ae574111818b8cd56b069.

Apparently this is useful for debugging from time to time!
2024-04-22 17:01:07 -04:00
Ryan C. Gordon
3dcacd2dc8
wikiheaders_options: People can include specific headers if they want!
Fixes #9536.
2024-04-22 16:59:31 -04:00
yassineimounachen
5ffb2f47d1 Add USB IDs for the Thrustmaster TS-XW racing wheel
To be of use, this depends on https://github.com/berarma/oversteer/pull/200 and https://github.com/Kimplul/hid-tmff2/pull/94.
2024-04-22 11:35:31 -07:00
Ryan C. Gordon
39d0e62ef5
dynapi: Remove DISABLE_JUMP_MAGIC.
The "jump magic" codepath was never written, and would have involved a lot
of low-level and platform/processor/compiler specific work.

A better solution is for compilers to treat the function call in the jump
table functions as a tail call, which would effectively produce the same
result in a portable way.

Clang already has a way to do this that we could add later. But this wouldn't
need a separate "jump magic" section.
2024-04-21 22:16:48 -04:00
Ryan C. Gordon
9128f92f38
dynapi: Remove unused ENABLE_SDL_CALL_LOGGING code.
This was hardcoded to disabled, since building it in bloated the binary
massively for little gain (one could probably accomplish this same thing
with ltrace or something).

If we need it, we'll pull it out of revision control.
2024-04-21 22:13:43 -04:00
Ryan C. Gordon
7a36504952
storage: SDL_WriteStorageFile() wasn't marked as SDLCALL.
Fixes #9594.
2024-04-21 09:26:07 -04:00
Erik Scholz
c623bd2fdc reword SDL_BlitSurfaceScaled param
so it will link to the type in the docs/wiki
2024-04-20 07:51:40 -07:00
Frank Praznik
fb4c15319e pipewire: Raise minimum build version to 0.3.44 2024-04-19 12:34:22 -04:00
Frank Praznik
566d142938 tests: Clean up the renderer in the video test suite since it isn't automatic anymore. 2024-04-19 12:23:40 -04:00
Frank Praznik
bede245395 Remove references to renderers being destroyed with windows in the documentation 2024-04-19 12:23:40 -04:00
Ryan C. Gordon
cab3defc18 render: SDL_DestroyWindow hollows out its renderer but doesn't free it.
This allows apps to destroy the window and renderer in either order, but
makes sure that the renderer can properly clean up its resources while OpenGL
contexts and libraries are still loaded, etc.

If the window is destroyed first, the renderer is (mostly) destroyed but its
pointer remains valid. Attempts to use the renderer will return an error,
but it can still be explicitly destroyed, at which time the struct is free'd.

If the renderer is destroyed first, everything works as before, and a new
renderer can still be created on the existing window.

Fixes #9540.
2024-04-19 00:25:59 -04:00
Ryan C. Gordon
39c8434f5f render: Manage memory for SDL_Renderer* at higher level.
Previously, each backend would allocate and free the renderer struct. Now
the higher level does it, so the backends only manage their private resources.

This removes some boilerplate and avoids some potential accidents.
2024-04-19 00:25:59 -04:00
Frank Praznik
09e32faa68 x11: Ensure that a configure event was received before sending the final window size and coordinates
Headless display servers might not send an initial configure event, so don't assume that one has arrived and send garbage size/position values when showing a window.
2024-04-18 14:28:16 -04:00
SDL Wiki Bot
64d5fb6ab6 Sync SDL3 wiki -> header 2024-04-18 17:41:14 +00:00
Anonymous Maarten
911fc9b17e testffmpeg: treat Khronos headers as system headers 2024-04-18 09:10:15 -07:00
devon-artmeier
9c65738926
dialog: Use size_t for length variables (#9572)
Shuts up a warning about size differences.
2024-04-18 09:09:10 -07:00
bootrako
1de8a53015 windows hidapi: fix header compilation 2024-04-18 09:00:49 -07:00
Frank Praznik
0bda7e22cf
wayland: Print an error when the display connection is closed by the server
Otherwise, it isn't immediately clear to the client application as to why its windows suddenly disappeared, and it received a quit event out of nowhere.
2024-04-18 11:23:58 -04:00
Frank Praznik
a923db9d0a
pipewire: Use the core version info for the preferred version check
When running in a container, the underlying Pipewire version may not match the library version, so retrieve and check the core version info to see if it meets the preferred version requirements.
2024-04-17 22:34:26 -04:00
Ryan C. Gordon
bc6ad3ee43
dialog: convert_ext_list had parameter names in wrong order in header. 2024-04-17 21:45:51 -04:00
Anonymous Maarten
7dd4f1ec22 SDL3 removed SDL_HINT_RENDER_SCALE_QUALITY hint
textures now default to linear filtering, use SDL_SetTextureScaleMode(texture, SDL_SCALEMODE_NEAREST) if you want nearest pixel mode instead
2024-04-17 16:38:15 -07:00
Ryan C. Gordon
093160904d
SDL_Keymod: Removed SDL_KMOD_RESERVED.
Fixes #9481.
2024-04-17 17:30:10 -04:00
Frank Praznik
b1e47704ee audio: Prefer Pipewire if at least version 1.0.0
Checking for the pipewire-pulse service is unreliable when used in containers such as Flatpak, so simply use a minimum version check instead and prefer it over the Pulseaudio backend if at least version 1.0.0.
2024-04-17 17:16:28 -04:00
SDL Wiki Bot
2c183c602d Sync SDL3 wiki -> header 2024-04-17 21:09:29 +00:00
Ryan C. Gordon
a18f3d55b7
SDL_iostream.h: Corrected documentation for SDL_ReadIO and SDL_WriteIO.
Fixes #9443.
2024-04-17 17:08:05 -04: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
Frank Praznik
a2eb2697a3 x11: Fix mode switching when running under XWayland
XWayland emulates the XRandR interface, so it still needs the actual mode switch call to trigger the mode switching emulation.

There is also no need to wait when using XWayland mode switching emulation, as it is handled via viewport scaling and thus instantaneous.
2024-04-17 11:39:49 -04:00
Frank Praznik
bed6c5b81f x11: Wait for mode switches to complete when synchronizing a window
Otherwise, the sync can timeout due to mode switching taking several seconds.
2024-04-17 11:39:49 -04:00
Sam Lantinga
e632ed23ad Fixed compilation with C89 (thanks @d-s-a!)
Closes https://github.com/libsdl-org/SDL/pull/9564

(cherry picked from commit 4e29be814e2a67992e7487b2b1814e37ff4c6980)
2024-04-17 07:49:19 -07:00
DevonArtmeier
65a04a772e dialog: Allocate space for terminator when building filter string 2024-04-16 14:09:18 -07:00
Ryan C. Gordon
fdcc3e1151
thread: make generic SDL_Condition a no-op if built with SDL_THREADS_DISABLED.
Otherwise, when you call SDL_CreateCondition() in something that can otherwise
survive in a single-threaded build, you'll get an error that seems fatal.

We already do this for mutexes and rwlocks (but not semaphores!)

Fixes #9558.
2024-04-16 15:07:56 -04:00
SDL Wiki Bot
bf0bf80df6 Sync SDL3 wiki -> header 2024-04-16 17:30:27 +00:00
Ryan C. Gordon
db6b6bd75e
include: Fixed up some sensor documentation.
Fixes #9468.
2024-04-16 13:29:26 -04:00
Sam Lantinga
650d3b44e1 Removed the word "other" since the version has been removed 2024-04-16 08:52:21 -07:00
Ryan C. Gordon
235bfe2631
SDL_log.h: Remove SDL_MAX_LOG_MESSAGE.
The message length limit was removed in 2.0.24, so there's no need for
this define in SDL3 at all.

Fixes #9467.
2024-04-16 00:31:57 -04:00
Ryan C. Gordon
12b371679f
audio: Code defensively to placate static analyzers, don't disabling warnings. 2024-04-15 23:53:56 -04:00
Sam Lantinga
bdd47f7770 Fixed warning: no previous extern declaration for non-static variable 'ResamplerFilter'
Fixes https://github.com/libsdl-org/SDL/issues/9556
2024-04-15 16:16:32 -07:00