Commit Graph

17830 Commits

Author SHA1 Message Date
kyle-sylvestre
22bc430bbb Set error using function hresult 2024-10-23 10:53:46 -07:00
Sam Lantinga
6eca02a0e7 evdev: correctly handle composite devices
These can be both mouse and keyboard and should be initialized and exposed to the application as both.
2024-10-23 10:52:50 -07:00
Sam Lantinga
ba1412cb9f evdev: fixed devices not being removed on disconnect 2024-10-23 10:52:00 -07:00
Sam Lantinga
370c0426ce testspriteminimal: only quit when escape is pressed 2024-10-23 10:51:14 -07:00
SDL Wiki Bot
acfc223e15 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 16:37:46 +00:00
Evan Hemsley
423337796c
GPU Vulkan: Use dedicated allocation for download buffers (#11298) 2024-10-23 09:37:06 -07:00
SDL Wiki Bot
24b376ef18 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 16:30:58 +00:00
Ryan C. Gordon
1c1706a00b
fnsince: update \since policy for documentation.
Everything in SDL3 up to the ABI lock is reported as available since 3.1.3.
Everything else will be reported as since 3.2.0 (what will be the first
official release).

Also ran a Perl script over the headers to change everything to 3.1.3 that
wasn't an API function, since fnsince.pl can't manage those. If there's a
macro or datatype that has snuck in that needs to be 3.2.0 instead, we'll
have to manually fix it up, but it shouldn't be a big deal in any case.

Reference PR #11304.
2024-10-23 12:22:43 -04:00
Michael Palomas
21c91d5535 examples now using SDL_ALPHA_OPAQUE(_FLOAT) for opaque alpha value 2024-10-23 07:28:33 -07:00
SDL Wiki Bot
63ef5a2369 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 05:42:03 +00:00
Petar Popovic
fd530d029f Fixed typo in SDL_clipboard.h 2024-10-22 22:41:30 -07:00
SDL Wiki Bot
7b6416add0 Sync SDL3 wiki -> header
[ci skip]
2024-10-23 05:41:03 +00:00
Petar Popovic
af1c165352 Set version of new identifiers after 3.1.3 release to 3.1.6 2024-10-22 22:40:07 -07:00
Sam Lantinga
45584ad73e Simplify get_channel_name() so it's easier for people to read and understand 2024-10-22 18:19:30 -07:00
Sam Lantinga
c134dd6e5e Fixed typo in the channel layout documentation 2024-10-22 17:46:57 -07:00
Ryan C. Gordon
4a8eadf167
include: Fixed typo in SDL_CopyFile's documentation.
Fixes https://github.com/libsdl-org/sdlwiki/issues/623
2024-10-22 20:12:04 -04:00
SDL Wiki Bot
d9e6fe0b7a Sync SDL3 wiki -> header
[ci skip]
2024-10-22 20:03:14 +00:00
Ryan C. Gordon
f5c27a3a2c
render: Corrected docs for SDL_SetRenderVSync(). 2024-10-22 16:01:58 -04:00
Ivan Epifanov
1f8b9a320c VITA: fix SDL_ShowMessageBox by using different memory type 2024-10-22 12:19:33 -07:00
SDL Wiki Bot
a42c9ec5f7 Sync SDL3 wiki -> header
[ci skip]
2024-10-22 17:49:11 +00:00
Ryan C. Gordon
2318961b6f
docs: Add \threadsafety to some low-hanging fruit across a few headers.
Reference Issue #7140.
2024-10-22 13:48:35 -04:00
Ryan C. Gordon
eed11ad6d6
docs: Fixed example code for SDL_qsort_r() and SDL_bsearch_r(). 2024-10-22 13:48:35 -04:00
Anonymous Maarten
0bec18245d android: fix android.content.Context:getCacheDir JNI prototype 2024-10-22 18:03:34 +02:00
Ryan C. Gordon
e9b5f6749e
wikiheaders: add (disabled) code to check for missing \threadsafety tags.
Reference Issue #7140.
2024-10-22 10:48:19 -04:00
Ryan C. Gordon
19a1175c02
include: Updated docs on SDL_TouchFingerEvent.
Fixes #4159.
2024-10-22 10:41:31 -04:00
Ryan C. Gordon
e61f0678ee
x11: Remove the "safety net" error handler.
This is an X11 error catcher that lived for the entire life of the program,
which causes problems in itself, but it also tries to make calls into Xlib,
which would cause further panics.

It's goal was to reset video modes if the app was going down, but it often
failed to do so, and caused potentially avoidable crashes instead.

Fixes #7975.
2024-10-22 10:41:30 -04:00
anton-kl
f9bffa31b6 docs: fix window flags in README-migration.md
Use correct SDL macro instead of invalid "flags" string.
Also add a comment about preferred approach.
2024-10-22 00:17:06 -07:00
Ryan C. Gordon
b0982e8982
docs: Updated README-emscripten.md.
This now mentions the main callbacks as a possible option, and removes the
part about prebuilt libraries. The latter can return when Emscripten packages
SDL3.

Fixes #11080.
2024-10-21 23:38:40 -04:00
Sam Lantinga
c56af0d975 Removed unused code 2024-10-21 17:26:14 -07:00
Sam Lantinga
35be8bb7f9 Fixed warning C4456: declaration of 'e' hides previous local declaration
This also fixes incorrect interpretation of OPENVR_SetupJoystckBasedOnLoadedActionManifest() return value.
2024-10-21 15:53:47 -07:00
Emmanuele Bassi
8119568805 x11: Remove text-scaling-factor setting checks
The text-scaling-factor setting is not useful, now that we watch the
Xft/DPI and Gdk/WindowScalingFactor XSETTINGS keys; on the contrary, it
is problematic in mixed environments with both the KDE and GNOME
portals, as they end up stepping on each other's toes, and we end up
with the wrong scaling factor value.

Fixes: https://github.com/libsdl-org/SDL/issues/11142
2024-10-21 15:26:22 -07:00
Sam Lantinga
1c51b8dc33 Only set the OpenGL flag if the OpenVR driver is active 2024-10-21 15:22:56 -07:00
Sam Lantinga
82b3325978 Fixed memory leaks if Windows initialization fails 2024-10-21 15:22:56 -07:00
Sam Lantinga
d199586683 Fixed memory leaks if OpenVR initialization fails 2024-10-21 15:22:56 -07:00
Sam Lantinga
7b492553c4 Allow the OpenVR driver to be enabled on Windows 2024-10-21 15:22:56 -07:00
Sam Lantinga
0aea14cf45 Added logging for additional events 2024-10-21 14:23:29 -07:00
Sam Lantinga
3d47877bb4 Added SDL_EVENT_RENDER_DEVICE_LOST
This is sent when the device is lost and can't be recovered.

Also fixed the vulkan renderer so it returns errors appropriately and will log and break if debug mode is enabled.
2024-10-21 13:28:40 -07:00
SDL Wiki Bot
54e52d055f Sync SDL3 wiki -> header
[ci skip]
2024-10-21 18:06:39 +00:00
Jordan Christiansen
9c848e08e4
docs: Explain events for already plugged in controllers (#11286) 2024-10-21 11:06:05 -07:00
Sam Lantinga
26567df878 Don't treat mouse buttons as focus clicks if the window has mouse capture
This fixes the following sequence:
* Press mouse button down
* Alt-tab away from the window
* Alt-tab back to the window
* Release mouse button

Fixes https://github.com/libsdl-org/SDL/issues/7747
2024-10-21 09:46:07 -07:00
Ryan C. Gordon
ef758d05c1
render: GetRenderViewportSize shouldn't use scale, just logical presentation.
Fixes #11076.
2024-10-21 11:17:16 -04:00
Sam Lantinga
92520c1d9b Improved D3D12 handling of unrecoverable device loss 2024-10-21 00:38:42 -07:00
Sam Lantinga
315842cf71 Fixed crashes handling D3D11/12 device lost in testsprite
You can test this using "dxcap -forcetdr"
2024-10-21 00:29:18 -07:00
Sam Lantinga
e2254b1045 Added color scale info for the GPU renderer TODO item 2024-10-20 18:38:02 -07:00
Petar Popovic
4b54e32231 Tweak android path functions comment tag \sa 2024-10-20 16:38:07 -07:00
mausimus
a6536a9298 RI_KEY_BREAK indicates key is up 2024-10-20 10:26:07 -07:00
Petar Popovic
679dd4b181 SDL_RequestAndroidPermission() comment: Add link to android permissions website 2024-10-20 10:13:03 -04:00
SDL Wiki Bot
eb1451536e Sync SDL3 wiki -> header
[ci skip]
2024-10-20 14:12:45 +00:00
Petar Popovic
5819d4b360 SDL_CreateRenderer() comment: Remove mention of flags 2024-10-20 10:12:14 -04:00
rhett-lee
e0321ca5b6
SDL3: SDL_render_gl(render name: opengl) dose not support transparent on Linux/X11 (Bug #11273) (#11274)
SDL3: SDL_render_gl(render name: opengl) dose not support transparent on Linux/X11:

Create SDL window with SDL_WINDOW_TRANSPARENT flag;
Create "opengl" renderer for the window;
The window can't shown with errors:
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 130 (MIT-SHM)
Minor opcode of failed request: 3 (X_ShmPutImage)
Bug reason:
SDL_x11window.c:490 : bool X11_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props)
SDL_x11window.c:566 : vinfo = X11_GL_GetVisual(_this, display, screen, transparent);[XVisualInfo *vinfo]
the X11_GL_GetVisual function returns a vinfo dose not support transparent.

Fix:
SDL_x11opengl.c:637 : XVisualInfo *X11_GL_GetVisual(SDL_VideoDevice *_this, Display *display, int screen, bool transparent)
X11_GL_GetVisual should returns a vinfo support transparent when transparent is true.
2024-10-19 20:21:50 -07:00