Commit Graph

17901 Commits

Author SHA1 Message Date
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
Sam Lantinga
dcbb2f11a8 Clamp the texture alpha and color modulation values to 0-255 2024-10-19 20:18:57 -07:00
Frank Praznik
541ba33714
Fix SDL_GetClosestFullscreenDisplayMode documentation
It returns false on failure, not NULL.
2024-10-19 16:01:08 -04:00
Cameron Cawley
40070d899d Refactor Blit_RGB555_ARGB1555 to be more generic 2024-10-19 11:11:22 -07:00
Ozkan Sezer
3d2c8c510d add GLES3 headers from Khronos for OpenVR video driver. 2024-10-19 10:23:55 -07:00
SDL Wiki Bot
2668558c5c Sync SDL3 wiki -> header
[ci skip]
2024-10-19 17:21:09 +00:00
Sam Lantinga
153f90a725 Revert "Use the correct return type for SDL_GetAndroidJNIEnv()"
This reverts commit 2d3fa03d53.

Different JDK implementations define JNIEnv differently for C++, so we can't provide the definition here.

Fixes:
/usr/lib/jvm/temurin-11-jdk-amd64/include/jni.h:195:17: error: conflicting declaration ‘typedef struct JNIEnv_ JNIEnv’
/home/runner/work/sdlwiki/sdlwiki/.github/../external/SDL3/include/SDL3/SDL_system.h:266:24: note: previous declaration as ‘typedef struct _JNIEnv JNIEnv’
2024-10-19 10:20:50 -07:00
Sam Lantinga
ffb1d9e4b4 Removed Blit2101010toN and BlitNto2101010
10-bit RGB formats are typically used with the PQ colorspace, which is handled by SDL_Blit_Slow.

Fixes https://github.com/libsdl-org/SDL/issues/11271
2024-10-19 10:07:53 -07:00
华仔
5c1ccaefae Fixed VULKAN_UpdateViewport judgment. 2024-10-19 09:51:12 -07:00
Frank Praznik
4c2d0c422b
wayland: Remove kde_output_order_v1 support
This protocol is unstable and not intended for clients, and SDL now sorts the display list into a stable order and selects a primary display suitable for games on its own, so it isn't necessary.

Reverts e71e16950a
2024-10-19 11:16:30 -04:00
SDL Wiki Bot
5f874b60a8 Sync SDL3 wiki -> header
[ci skip]
2024-10-19 14:49:21 +00:00
Anonymous Maarten
1647d36aec
docs: document copying shared SDL3 a bit more + document sanitizer/libc incompatibility 2024-10-19 14:48:51 +00:00
Ryan C. Gordon
b6a6a4a7f8
audio: fix incorrect dynCall in Emscripten audio.
This only seemed to cause problems with `-s ASYNCIFY` on the build command
line, but it was incorrect in general.

Fixes #11258.
2024-10-18 23:53:40 -04:00
Sam Lantinga
07bb8f1c4c openvr: added APIENTRY for OpenGL functions (thanks @cnlohr!) 2024-10-18 16:40:36 -07:00
Sam Lantinga
b40ad5428b Fixed assertion at quit when the debug text was the last texture used. 2024-10-18 14:51:40 -07:00
Maia
a48fa675be Fix formatting 2024-10-18 13:45:04 -07:00
Sam Lantinga
1d23d2c3c2 Renamed SDL_SANDBOX_UNKNOWN to SDL_SANDBOX_UNKNOWN_CONTAINER 2024-10-18 12:45:07 -07:00
Frank Praznik
a7da3ad59b x11: Support sorting displays via the priority hint
Store the connector name for displays and use it for sorting them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
Frank Praznik
0faf9dc4a4 kmsdrm: Support sorting displays via the priority hint
Use the connector name for displays and sort them according to priority, if the hint is set.
2024-10-18 13:09:08 -04:00
Ozkan Sezer
a6e5ab437f video/openvr: Avoid type redefinition errors.
Also, let SDL handle stdint.h and stdbool.h.
2024-10-18 19:21:32 +03:00
SDL Wiki Bot
2654d5d48b Sync SDL3 wiki -> header
[ci skip]
2024-10-18 02:34:29 +00:00
Sam Lantinga
e81e917c5e Added an OpenVR video driver (thanks @cnlohr!) 2024-10-17 19:38:04 -07:00
Ozkan Sezer
569691797d windows/SDL_systhread.c: fix permissions 2024-10-18 05:00:04 +03:00
Sasha Szpakowski
186c6e5c9d windows: fix race condition with exception-based thread naming. 2024-10-17 18:42:01 -07:00
Sam Lantinga
faa404a652 If we get a newline character, treat it as SDLK_RETURN
Fixes https://github.com/libsdl-org/SDL/issues/10679
2024-10-17 18:18:38 -07:00
Sam Lantinga
a432abf4cc Make sure that we quit if we get a terminating event
This covers the case where the application didn't handle the quit or terminating event, we still need the main loop to finish.
2024-10-17 17:19:49 -07:00
Sam Lantinga
c5e1ae4580 Only free debug_char_texture_atlas if it has been allocated
Fixes https://github.com/libsdl-org/SDL/issues/11254
2024-10-17 17:19:49 -07:00
Sam Lantinga
00f4cb308b Fixed crash if the Vulkan renderer changes swapchain image count 2024-10-17 17:19:49 -07:00
Sam Lantinga
41366f73b2 Don't block in Android USB device open
We might be waiting a long time for a permissions dialog, so let that complete asynchronously. While that's happening, we'll remove the device from the device list so that when we get permission the application sees the device as newly available and can open it again.

Fixes https://github.com/libsdl-org/SDL/issues/6347
2024-10-17 12:02:24 -07:00
Sam Lantinga
60c3eaf5ee Use SDL_GetAndroidJNIEnv() in hid.cpp 2024-10-17 12:02:24 -07:00