Charles Cross
e306cbcbee
Updates CheckLibUDev() to match main, fixing missing HAVE_LIBUDEV
2024-07-29 07:21:14 -07:00
Ozkan Sezer
2cb2897e50
SDL_mslibc.c: revert PR/10303 changes
2024-07-28 22:47:51 +03:00
Frank Praznik
5d1ca1c8c7
wayland: Don't fail to retrieve a system cursor if no window is focused
...
Doing this can leave the cursor data in a weird, corrupt state.
(cherry picked from commit 5617ce277d )
2024-07-27 20:30:52 -04:00
Anonymous Maarten
50a6a39dd6
cmake: use genexes for linking against apple frameworks
2024-07-27 17:13:52 +02:00
Ozkan Sezer
73066492f6
testshader.c: include stdlib.h for exit()
2024-07-22 17:40:56 +03:00
Ozkan Sezer
86b4d035db
SDL_stdinc.h (SDL_COMPILE_TIME_ASSERT): Keep C++ case alone (after PR/10331)
...
Some versions of gcc will define __STDC_VERSION__ even when compiling in C++ mode.
Reference issue: https://github.com/libsdl-org/SDL/issues/6078 which was fixed by
f6b81125b3
(cherry picked from commit 70c1012e8c )
2024-07-22 16:02:00 +03:00
Anonymous Maarten
5d606eaae2
stdinc: c23 deprecated _Static_assert in favor of static_assert
...
(cherry picked from commit 22bfbdbc02 )
2024-07-21 21:55:10 +03:00
Charlie Birks
6e931bee01
emscripten: restore key event prevent default behaviour
...
This restores the behaviour before 9221548114 where we only preventDefault the event if:
- the key is recognised
- the event is enabled
- the event is not filtered
(ignoring the KEYPRESS special case, which is unchanged)
2024-07-19 09:39:00 -07:00
Anonymous Maarten
fd32342ced
ci: build MSVC workflows using Ninja generator
2024-07-19 10:20:11 +00:00
Anonymous Maarten
ab4370c247
cmake: detect ARM64EC and enable SDL_LIBC by default
2024-07-19 10:20:11 +00:00
Anonymous Maarten
7fb8b62a4d
cmake: fix building UWP with non-MSVC generator
2024-07-19 10:20:11 +00:00
Anonymous Maarten
11c0dfbdfe
Fix UWP build in non-UNICODE mode
2024-07-19 10:20:11 +00:00
vanfanel
5ab1151508
Fix KMSDRM double buffering.
2024-07-18 14:35:00 -07:00
vanfanel
9e6b8d56e3
Add SDL_VIDEO_DOUBLE_BUFFER support to the Wayland backend.
2024-07-17 16:36:04 -04:00
Amir
ccade50587
Fix warning for Android NDK compiler: "function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"
...
https://stackoverflow.com/questions/42125/warning-error-function-declaration-isnt-a-prototype
In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing.
2024-07-17 10:51:30 -07:00
Ryan C. Gordon
3f9591babe
README-macos: fixed some text.
...
(cherry picked from commit 199e6929e5 )
2024-07-16 08:27:12 -04:00
Anonymous Maarten
256269afb3
sdl2-config.in: use backtics instead of $() for older shells
...
/bin/sh of Solaris does not understand $()
2024-07-14 19:36:46 +02:00
Anonymous Maarten
2eeb39298e
pthread: timespec.tv_nsec must be less then 1000000000 ns
2024-07-14 17:29:07 +02:00
ceski
3b7eafedb3
Add a Windows mapping for SplitFish Game Controller
...
(cherry picked from commit 68cf17d0d4 )
2024-07-12 22:04:29 -07:00
Anonymous Maarten
bc39952b23
cmake: only add SDL_LIBC=0 compile options to SDL2 libraries
2024-07-12 23:09:56 +02:00
Anonymous Maarten
a25f94c9a8
ci: run VC tests under sdlprocdump
2024-07-12 18:47:18 +02:00
Anonymous Maarten
bba51871a8
cmake: only link SDL2 against test executables
2024-07-12 18:47:18 +02:00
Sam Lantinga
b057159db7
Make sure SDL subsystems are initialized before starting threads
2024-07-12 09:09:57 -07:00
Sam Lantinga
b378bc5c83
Make sure timers are initialized before any threads start
...
This prevents race conditions and divide by zero if multiple threads start using the time functions simultaneously.
2024-07-12 08:00:04 -07:00
Sam Lantinga
b13dcf24d6
Fixed OS/2 build
2024-07-11 13:55:24 -07:00
Sam Lantinga
551164812a
Added TLS initialization and shutdown functions
...
Fixes https://github.com/libsdl-org/SDL/issues/8576
(cherry picked from commit b517043936 )
2024-07-11 13:10:15 -07:00
Ozkan Sezer
956a8bf6c0
ci: bump FreeBSD
...
Reference issue: https://github.com/libsdl-org/SDL/issues/10224 .
2024-07-11 18:55:50 +03:00
Ryan C. Gordon
663411ff77
haiku: Don't change the cwd on startup if launched from a Terminal.
...
This patch was written by @pulkomandy. Thanks!
Reference Issue #7596 .
2024-07-11 11:42:21 -04:00
Substring
a2215ff81c
KMSDRM: fix unsupported modifiers
...
(cherry picked from commit 9548bba63a )
2024-07-10 14:42:32 -07:00
Ahmed Essam
b80f6ec05c
emscripten: don't consume key down/up events if the user disabled them
2024-07-10 09:29:43 -07:00
Sam Lantinga
3899cb1696
Revert "Fixed build"
...
This reverts commit 026dfc6305 .
Fixed build again!
2024-07-08 14:46:15 -07:00
Sam Lantinga
026dfc6305
Fixed build
2024-07-08 11:39:08 -07:00
Sam Lantinga
e22c89536a
Make sure we're actually running on Windows before using D3D renderers
2024-07-08 11:28:29 -07:00
Frank Praznik
849c905d8c
wayland: Always create a viewport for the window if available
...
Viewports decouple the buffer from the window size and avoids the window geometry hacks used to prevent problems if a buffer with an old size in the pipeline ends up being committed.
Fixes an invalid geometry warning and incorrect overview size for fullscreen windows on GNOME, and avoids flicker when entering/exiting fullscreen or moving the window between scaled and non-scaled displays.
2024-07-08 11:54:10 -04:00
mariob92
58e179c8b5
wgl/glx: Fix attribute list for SDL_GL_FLOATBUFFERS
...
This commit fixes the attribute list in the WGL and GLX code when requesting a floating point pixel format. The name of the attribute was missing in the list.
Fixes libsdl-org#10189
(cherry picked from commit 9389712917 )
2024-07-06 11:56:38 -07:00
Sam Lantinga
4c44450258
Improved detection of Nintendo Switch Pro controller report mode
...
Fixes https://github.com/libsdl-org/SDL/issues/10182
(cherry picked from commit 4ba2e9f4f4 )
2024-07-06 05:30:08 -07:00
Ozkan Sezer
6a10309568
SDL_hidapi.c: work-around watcom build error when libusb is enabled
2024-07-05 18:56:10 +03:00
Max Maisel
22770e6496
Drain HIDAPI buffer in SDL_hidapi_steamdeck.c.
...
Add a loop around SDL_hid_read() in the Steam Deck HIDAPI driver as it
is done in other HIDAPI drivers. This loop reads data from the device and
processes it until the input buffer is empty which ensures that clients
always get the latest data.
This fixes an input latency issue if the application polls the events
slower than the hardware generates them.
2024-07-05 08:27:09 -07:00
Sam Lantinga
a4cbba1276
Try to create an accelerated renderer for the window surface even if SDL_HINT_RENDER_DRIVER is "software"
...
This case is properly handled inside SDL_CreateWindowTexture()
Fixes https://github.com/libsdl-org/SDL/issues/10155
(cherry picked from commit c7ed78a9ef )
2024-07-05 08:23:17 -07:00
Ryan C. Gordon
b47deb58a2
vitagxm: Patched to compile.
2024-07-04 20:37:46 -04:00
Ryan C. Gordon
2c32fd254c
Revert "render: Set renderer->window to NULL in SDL_DestroyRendererWithoutFreeing."
...
This reverts commit 9f8dffbd2d .
This causes some tests to fail, and wasn't otherwise a necessary change, so
I'm backing it out.
(Looks like some sort of interaction with software renderers and their
surfaces not getting destroyed...?)
(cherry picked from commit f9a06c20ed )
2024-07-04 19:47:39 -04:00
Ryan C. Gordon
5f0f337d33
vitagxm: Patched to compile.
2024-07-04 18:48:21 -04:00
Ryan C. Gordon
1413d67748
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 #10174 .
(cherry picked from commit cab3defc18 )
2024-07-04 18:46:43 -04:00
Ryan C. Gordon
944dc4701c
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.
(Manually cherry-picked from 39c8434f5f )
Reference Issue #10174 .
2024-07-04 18:17:20 -04:00
Sam Lantinga
845ebbbe96
Added support for the ROG RAIKIRI
...
(cherry picked from commit a04596c9a7 )
2024-07-03 13:54:31 -07:00
Sam Lantinga
cd8ea5e3f1
Only use the default gamepad mapping if an automatic mapping isn't available
...
Fixes https://github.com/libsdl-org/SDL/issues/10162
(cherry picked from commit 0f8054cf87 )
2024-07-03 11:47:20 -07:00
Sam Lantinga
288aea3b40
Fixed build
2024-06-29 11:22:29 -07:00
Sam Lantinga
0d9e54237c
Respect SDL_HINT_RENDER_DRIVER when creating an accelerated window surface
...
Fixes https://github.com/libsdl-org/SDL/issues/10061
(cherry picked from commit 2a58e7b11c )
2024-06-29 11:13:01 -07:00
Sam Lantinga
a3f0c373d3
Clean up any renderer in SDL_DestroyWindowSurface()
...
Also added an automated test to verify window surface functionality.
Fixes https://github.com/libsdl-org/SDL/issues/10133
(cherry picked from commit a522bfe3f1 )
2024-06-29 11:04:15 -07:00
Ozkan Sezer
a0ec7c0906
libtool.m4: fix appending of -no_fixup_chains to allow_undefined_flag.
2024-06-29 17:50:40 +03:00