Commit Graph

21394 Commits

Author SHA1 Message Date
Max Seidenstücker
144ab4ba99 Void function return
Clang: void function should not return void expression [-Wpedantic]
2026-02-07 18:06:10 +03:00
Max Seidenstücker
0c7d4d5a89 Static at beginning
GCC: 'static' is not at beginning of declaration [-Wold-style-declaration]
2026-02-07 18:05:39 +03:00
RaceTheMaSe
9fda8f2669 Fix -Wnewline-eof warnings (#14989) 2026-02-07 18:04:18 +03:00
Max Seidenstücker
bf58ff81d8 comma at end of enum
GCC: comma at end of enumerator list [-Wpedantic]
2026-02-07 15:54:13 +01:00
Ryan C. Gordon
3dc48a4890 video: Wrap OpenGL work in ifdefs.
Apparently the rest of SDL_GL_CreateContext compiles on platforms without
OpenGL, though!  :)
2026-02-06 14:00:19 -05:00
SDL Wiki Bot
df9f56f958 Sync SDL3 wiki -> header
[ci skip]
2026-02-06 18:59:48 +00:00
Sam Lantinga
88d5a5a2b9 Clarify that SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS can be set anytime
Fixes https://github.com/libsdl-org/sdlwiki/issues/914
2026-02-06 10:58:58 -08:00
Ryan C. Gordon
9f5747ccd4 video: Respect SDL_HINT_OPENGL_FORCE_SRGB_CAPABLE with GL_FRAMEBUFFER_SRGB.
Reference Issue #14898.
2026-02-06 13:54:32 -05:00
Ryan C. Gordon
01689bca0e video: Maybe fix build. 2026-02-06 13:50:27 -05:00
Ryan C. Gordon
083c6b8872 video: Force GL_FRAMEBUFFER_SRGB state at OpenGL context creation time.
The default varies between OpenGL and OpenGL ES, so try to force it to what
the app actually requested with SDL_GL_FRAMEBUFFER_SRGB_CAPABLE.

Fixes #14898.
2026-02-06 13:44:21 -05:00
Ryan C. Gordon
60690ff829 render: OpenGL and GLES2 should explicitly request a not-sRGB-capable context.
Reference Issue #14898.
2026-02-06 13:44:20 -05:00
Sam Lantinga
c9116daa71 Fixed build 2026-02-06 10:32:19 -08:00
Sam Lantinga
8e783e0892 Fixed building with Visual Studio 2019 2026-02-06 10:15:39 -08:00
Sam Lantinga
56b77177a9 Fixed building with -DSDL_HIDAPI=OFF
Fixes https://github.com/libsdl-org/SDL/issues/14975
2026-02-06 09:59:37 -08:00
Sam Lantinga
fdfcfc0566 Make sure native textures have the same channel precision if possible
Fixes https://github.com/libsdl-org/SDL/issues/14882
2026-02-06 09:50:18 -08:00
Jari Vetoniemi
ef41e0a0f0 cocoawindow: fix wrong content scale with ANGLE EGL context
ANGLE expects that the surface layer content scale is updated
accordingly.

<b406401e42/src/libANGLE/renderer/metal/SurfaceMtl.mm (L597-L636)>
2026-02-06 09:16:59 -08:00
Wohlstand
a36ef1f187 SDL_render_psp.c: Also apply the similar fix to PSP
Since this problem is the same here
2026-02-06 09:02:41 -08:00
Wohlstand
87a81bd09d SDL_render_vita_gxm.c: Fixed the black screen due to zero cliprect 2026-02-06 09:02:41 -08:00
Wohlstand
75d1d64c75 Revert "Reverted Vita cliprect changes"
This reverts commit aeb4b3d2fc.
2026-02-06 09:02:41 -08:00
Cameron Cawley
7b8ce0df4b Add QNX to the supported platforms list 2026-02-05 16:50:24 -08:00
Ryan C. Gordon
50f3adec77 cocoa: Fix SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES=0.
This hint is documented to not just turn off fullscreen windows going into a
new Fullscreen Space, but also to make the green button on a resizeable
window's title bar do a maximize/zoom instead of make the window fullscreen.

Previously, this only did the former and not the latter (or perhaps it worked
and the defaults changed in a newer macOS, we aren't sure).

Fixes #7470.
2026-02-05 18:39:48 -05:00
Vicki Pfau
e1b8ad0380 Add and use libusb_set_auto_detach_kernel_driver for the Switch 2 driver 2026-02-05 14:58:15 -08:00
Sam Lantinga
b9743eabdd Removed spurious "extern" 2026-02-05 14:07:01 -08:00
SDL Wiki Bot
ae4fb50316 Sync SDL3 wiki -> header
[ci skip]
2026-02-05 20:15:42 +00:00
Ryan C. Gordon
632c83b722 opengl: added SDL_HINT_OPENGL_FORCE_SRGB_CAPABLE.
Reference Issue #14898.
2026-02-05 15:14:18 -05:00
Sam Lantinga
0cadc15ef6 Don't treat "hid-over-i2c 0107 System Control" as a joystick 2026-02-05 11:27:05 -08:00
Jesse Chounard
cb0c7b01e4 tray: removed double click handling 2026-02-05 11:08:05 -08:00
Jesse Chounard
bc16157c9d testtray: created VS project and added new click callbacks 2026-02-05 11:08:05 -08:00
Sam Lantinga
bddf6d3e2a Guarantee that pens are in proximity before motion and button events
This also delays pen proximity out events to make sure that the pen is really gone before delivering them. On Android, you get a HOVER_EXIT event when the pen contacts the surface, which we don't want to treat as the pen leaving proximity.
2026-02-05 10:24:04 -08:00
Sam Lantinga
cd7fc90c87 Added support for the third stylus button on Android 2026-02-05 10:24:04 -08:00
Sam Lantinga
273a093032 Temporarily disable GameSir driver
There are some issues that need response from GameSir before this can be enabled by default.
2026-02-04 15:53:01 -08:00
Sam Lantinga
ca7788cd9f Fixed spacing 2026-02-04 15:53:01 -08:00
Sam Lantinga
d43d29269d Added support for GameSir simple report mode 2026-02-04 15:53:01 -08:00
Sam Lantinga
8a9722e9f4 Removed GameSir trigger rumble
This doesn't appear to actually be supported by the hardware, and used the same report as normal rumble.
2026-02-04 15:53:01 -08:00
Sam Lantinga
883066228b Minor code cleanup
- the connection type is already set correctly based on bluetooth connection state
- removed some verbose controller type logging
- device and ctx are guaranteed not to be NULL at the driver level
2026-02-04 15:53:01 -08:00
Sam Lantinga
1a99861510 Fixed warnings building on Android 2026-02-04 14:55:29 -08:00
Sam Lantinga
cd14bf3d00 Fixed warning: no previous prototype for function 'SDL_PrivateIsGamepadPlatformMatch' 2026-02-04 14:40:42 -08:00
SDL Wiki Bot
3b43b55e2a Sync SDL3 wiki -> header
[ci skip]
2026-02-04 20:51:27 +00:00
Jesse Chounard
70e16a8d13 tray: Add icon click callbacks for Windows and macOS (#14964) 2026-02-04 12:50:00 -08:00
Frank Praznik
bd472b43f5 wayland: Only use owned surface data when processing touches
Otherwise, user data set externally may be treated as SDL window data.
2026-02-04 14:28:30 -05:00
Ryan C. Gordon
f60e79feaf test_common: Changed a bunch of strcmp ifs to else ifs. 2026-02-04 14:27:41 -05:00
Ryan C. Gordon
10cc3dbe53 test_common: add a --fill-document command line option.
Probably rarely used, but one _can_ specify command line options to an
Emscripten program in its index.html wrapper, I think.
2026-02-04 14:14:15 -05:00
Ryan C. Gordon
7f94c7782a hints: Reformatted some documentation that got mangled.
[ci skip]
2026-02-04 13:46:15 -05:00
Ozkan Sezer
59e3ad0079 SDL_gpu_d3d12.c: Silence -Wuninitialized warning from old gcc versions:
SDL_gpu_d3d12.c: In function 'D3D12_GetXRSwapchainFormats':
SDL_gpu_d3d12.c:9107:26: warning: 'sdlFormat' may be used uninitialized in this function
2026-02-04 07:47:02 +03:00
Ozkan Sezer
427941012e SDL_gpu_vulkan.c: Silence -Wuninitialized warning from old gcc versions:
SDL_gpu_vulkan.c: In function 'VULKAN_GetXRSwapchainFormats':
SDL_gpu_vulkan.c:12927: warning: 'sdlFormat' may be used uninitialized in this function
2026-02-04 07:39:20 +03:00
chenzw
1fd7cd693a pass payload to state handler 2026-02-03 20:09:04 -08:00
chenzw
8272699901 refactor(joystick): unify GameSir packet parsing with packet/payload offsets, fix field byte indexing and standardize length checks 2026-02-03 20:09:04 -08:00
chenzw
e087de5741 refactor for style (no functional changes) 2026-02-03 20:09:04 -08:00
walle
f5efba34da Fix multi-platform compilation issues 2026-02-03 20:09:04 -08:00
chenzw
bb8eee8fac Added support for the GameSir-G7 Pro 8K controller 2026-02-03 20:09:04 -08:00