Sam Lantinga
00a7191f67
SDL_XINPUT_Enabled() returns false until XInput DLL is successfully loaded
...
We make sure we initialize XInput first, so that anything checking whether it's enabled gets a valid result based on whether we were able to load it or not.
(cherry picked from commit 8f46cb771c
)
(cherry picked from commit f5ed158d1f
)
2024-09-06 11:24:58 -07:00
Sam Lantinga
d53b22e8f0
Fixed race condition at startup that could cause a crash in the XInput driver
...
(cherry picked from commit 6d7c211faf
)
(cherry picked from commit 5aadfd4eaf
)
2024-09-06 10:38:16 -07:00
Sam Lantinga
e5bb4fa90f
Fixed memory leak in testthread
...
(cherry picked from commit dfe6efcd2d
)
(cherry picked from commit 224a37faab
)
2024-09-05 07:20:05 -07:00
Sam Lantinga
ba9b075eba
Use atomic variables for thread communication
...
Fixes https://github.com/libsdl-org/SDL/issues/10711
(cherry picked from commit a0f36fb85b
)
(cherry picked from commit a75227aaeb
)
2024-09-05 07:19:09 -07:00
Sam Lantinga
85b2733324
Make newer DRM and GBM functions optional
...
Fixes https://github.com/libsdl-org/SDL/issues/10675
(cherry picked from commit d501f6db07
)
(cherry picked from commit 10b4a79379
)
2024-09-02 13:08:47 -07:00
Sam Lantinga
9519b9916c
Updated to version 2.30.7 for release
release-2.30.7
2024-09-01 08:11:12 -07:00
Ozkan Sezer
00494df2f1
RAWINPUT_JoystickOpen: add missing SDL_stack_free() calls.
...
Fixes https://github.com/libsdl-org/SDL/issues/10574 .
(cherry picked from commit 845212388e
)
(cherry picked from commit 4eac44bed4
)
2024-08-25 11:05:56 +03:00
Sam Lantinga
948196448f
Added support for the Retro-bit Controller in PS3 mode
...
Fixes https://github.com/libsdl-org/SDL/issues/10557
(cherry picked from commit e75175129f
)
(cherry picked from commit 0de601dc64
)
2024-08-19 16:50:00 -07:00
Ozkan Sezer
7ca3d26e7a
SDL_x11mouse.c: avoid -Wunused-variable if xinput2 is not available
...
(cherry picked from commit 30972d7e7f
)
2024-08-17 11:23:32 +03:00
Frank Praznik
f79d28085d
wayland: Send fake warp coordinates when emulating warps with relative mode
...
Send the fake warp coordinates when emulating warps with relative mode to ensure that it appears that the cursor is always reset to where the application expects it to be.
Fixes cases where games can continue moving the camera if the mouse is lifted during motion.
(cherry picked from commit 8fcbf972c6
)
2024-08-16 11:27:44 -04:00
Frank Praznik
74a005f73f
x11: Track cursor visibility internally
...
Cursor visibility in the SDL input layer only reflects whether ShowCursor/HideCursor was called. In the case of relative mode, the cursor can be hidden, but the SDL_Mouse visibility flag will be true.
Track cursor visibility separately in the X11 driver. Fixes the cursor becoming visible when using the warping relative mode with XWayland.
(cherry picked from commit b0713a7d30
)
(cherry picked from commit 5b57573439
)
2024-08-16 10:36:33 -04:00
Sam Lantinga
6f7aa1e755
Use drmModeAddFB() if drmModeAddFB2WithModifiers() fails
...
Fixes https://github.com/libsdl-org/SDL/issues/10276
(cherry picked from commit 8e99ec34bb
)
(cherry picked from commit b360214950
)
2024-08-15 11:54:06 -07:00
Wohlstand
847a6cce96
SDL_vitatouch.c: Fixed the incorrect touch device IDs
...
- Begining of device ID with 0 violates the SDL's specification that means the 0 is an error, invalid, failure, etc. But on Vita here it's an actual device...
- Replacing 0 and 1 with 1 and 2 to resolve this violation.
(cherry picked from commit dd6c663918
)
2024-08-14 08:39:58 -07:00
Sam Lantinga
95aed34a69
Fixed build
...
(cherry picked from commit 70890b175e
)
2024-08-13 09:36:36 -07:00
Ilya Mizus
21e0382edd
Fixed secondary screens on KMSDRM ( #10535 )
...
* Removed window movement to left top corner that breaks secondary screens on KMSDRM
(cherry picked from commit ce98550cbb
)
(cherry picked from commit 586a2dc721
)
2024-08-13 09:36:36 -07:00
KaJe
0cdfdb9970
Add Cammus C12 VID & PID to wheel device list.
...
Add Cammus C12 in the SDL wheel list to enable wheel detection for them.
(cherry picked from commit e1571d704d
)
(cherry picked from commit 5ecbc00f36
)
2024-08-09 06:49:06 -07:00
Sam Lantinga
f75b0aa814
kmsdrm: free the connector when looking for available devices
...
Fixes https://github.com/libsdl-org/SDL/issues/10499
(cherry picked from commit 1a57ea7fba
)
(cherry picked from commit a5bff78d81
)
2024-08-08 09:30:33 -07:00
Sam Lantinga
403f87340f
Fixed crash when the current mouse capture window is destroyed
...
Fixes https://github.com/libsdl-org/SDL/issues/10494
(cherry picked from commit 91d97a367e
)
(cherry picked from commit 5ca0639a42
)
2024-08-07 12:36:04 -07:00
Sam Lantinga
07cfc34a2e
Added detail about why a file couldn't be opened (thanks mgerhardy!)
...
Fixes https://github.com/libsdl-org/SDL/issues/10484
(cherry picked from commit 1512013320
)
2024-08-06 05:46:37 -07:00
Anonymous Maarten
4222cebef6
Use SDL_test + don't use macros
...
The structure of the existing loop makes the inner loop of the previous commit unnecessary.
Manual backport of 558630d59c
(cherry picked from commit 62f35ab1b6
)
2024-08-05 07:25:35 -07:00
Sam Lantinga
1e2aa2363b
Implemented left-justification in SDL_PrintString()
...
Fixes https://github.com/libsdl-org/SDL/issues/10310
(cherry picked from commit f59d66f4b1
)
(cherry picked from commit 2efbe7fa3f
)
2024-08-04 20:07:06 -07:00
vanfanel
0b25cd2196
Fix KMSDRM double buffering.
...
(cherry picked from commit 5ab1151508
)
2024-08-04 15:53:44 -07:00
Anonymous Maarten
b7457ff61b
cmake: SDL2 target is not always available
...
(cherry picked from commit 7cf3234efe
)
2024-08-04 15:53:17 +02:00
Sam Lantinga
ba2f78a006
Updated to version 2.30.6 for release
release-2.30.6
2024-08-01 14:16:41 -07:00
Sam Lantinga
dcbdf09709
Fixed macOS build
...
(cherry picked from commit 230f1debd0
)
2024-08-01 14:15:16 -07:00
Sam Lantinga
a9b11980d2
Fixed building on macOS with OpenGL disabled
...
Fixes https://github.com/libsdl-org/SDL/issues/6226
(cherry picked from commit 0b6eff4167
)
2024-08-01 14:04:27 -07:00
Sam Lantinga
906d0e9c03
Fixed crash with joystick rumble after disconnection
...
This prevents continuing a rumble after the first one fails, and fixes a long standing crash issue if rumble is started immediately before the controller is disconnected.
Thanks to @AntTheAlchemist for the key bug report that showed what was happening here.
Fixes https://github.com/libsdl-org/SDL/issues/10422
(cherry picked from commit 0a924b185d
)
(cherry picked from commit 7fdf794377
)
2024-07-29 13:51:22 -07:00
Sam Lantinga
0952ab1ab9
Fixed whitespace
...
(cherry picked from commit 67b973b5fa
)
(cherry picked from commit 15c73f5bfe
)
2024-07-29 12:52:54 -07:00
Charles Cross
7635776ca4
Updates CheckLibUDev() to match main, fixing missing HAVE_LIBUDEV
...
(cherry picked from commit e306cbcbee
)
2024-07-29 07:22:29 -07:00
Ozkan Sezer
76a3457ad5
SDL_mslibc.c: revert PR/10303 changes
...
(cherry picked from commit 2cb2897e50
)
2024-07-28 22:50:00 +03:00
Frank Praznik
881c4cb49e
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
)
(cherry picked from commit 5d1ca1c8c7
)
2024-07-27 20:32:33 -04:00
Ozkan Sezer
0406d1c316
testshader.c: include stdlib.h for exit()
2024-07-22 17:40:56 +03:00
Ozkan Sezer
1ca76a29d9
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
)
(cherry picked from commit 86b4d035db
)
2024-07-22 16:02:50 +03:00
Anonymous Maarten
e53df5b07e
stdinc: c23 deprecated _Static_assert in favor of static_assert
...
(cherry picked from commit 22bfbdbc02
)
(cherry picked from commit 5d606eaae2
)
2024-07-21 13:18:55 -07:00
Amir
e7a47e783b
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.
(cherry picked from commit ccade50587
)
2024-07-17 14:48:06 -07:00
Ryan C. Gordon
279eb89ce5
README-macos: Typo fixes.
...
(Manually cherry-picked from 199e6929e5284b8573f02dcb655d3803ed436615.)
2024-07-16 08:32:29 -04:00
Anonymous Maarten
fe9020dcb8
pthread: timespec.tv_nsec must be less then 1000000000 ns
...
(cherry picked from commit 1ef041a2ca
)
2024-07-14 17:29:33 +02:00
ceski
4927836b2d
Add a Windows mapping for SplitFish Game Controller
...
(cherry picked from commit 68cf17d0d4
)
(cherry picked from commit 3b7eafedb3
)
2024-07-12 22:04:47 -07:00
Anonymous Maarten
5a072d38db
cmake: only add SDL_LIBC=0 compile options to SDL2 libraries
2024-07-12 23:18:06 +02:00
Sam Lantinga
2d1ebf4850
Make sure SDL subsystems are initialized before starting threads
...
(cherry picked from commit b057159db7
)
2024-07-12 09:11:38 -07:00
Sam Lantinga
44ec2027f3
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.
(cherry picked from commit b378bc5c83
)
2024-07-12 08:02:09 -07:00
Sam Lantinga
000da98663
Fixed OS/2 build
...
(cherry picked from commit b13dcf24d6
)
2024-07-11 13:56:11 -07:00
Sam Lantinga
87ba287f81
Added TLS initialization and shutdown functions
...
Fixes https://github.com/libsdl-org/SDL/issues/8576
(cherry picked from commit b517043936
)
(cherry picked from commit 551164812a
)
2024-07-11 13:10:40 -07:00
Ozkan Sezer
d133701a72
ci: bump FreeBSD
...
Reference issue: https://github.com/libsdl-org/SDL/issues/10224 .
(cherry picked from commit 956a8bf6c0
)
2024-07-11 18:55:56 +03:00
Substring
4635f8597d
KMSDRM: fix unsupported modifiers
...
(cherry picked from commit 9548bba63a
)
(cherry picked from commit a2215ff81c
)
2024-07-10 14:43:06 -07:00
Sam Lantinga
802351be25
Fixed build
...
(cherry picked from commit 026dfc6305
)
2024-07-08 11:39:25 -07:00
Sam Lantinga
d3765b27c2
Make sure we're actually running on Windows before using D3D renderers
...
(cherry picked from commit e22c89536a
)
2024-07-08 11:29:29 -07:00
mariob92
7b11fff2ee
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
)
(cherry picked from commit 58e179c8b5
)
2024-07-06 11:57:23 -07:00
Sam Lantinga
de4573275a
Improved detection of Nintendo Switch Pro controller report mode
...
Fixes https://github.com/libsdl-org/SDL/issues/10182
(cherry picked from commit 4ba2e9f4f4
)
(cherry picked from commit 4c44450258
)
2024-07-06 05:30:41 -07:00
Ozkan Sezer
275c94c900
SDL_hidapi.c: work-around watcom build error when libusb is enabled
...
(cherry picked from commit 6a10309568
)
2024-07-05 18:56:20 +03:00