Commit Graph

16727 Commits

Author SHA1 Message Date
Ryan C. Gordon b975babfa5
pen: Emscripten support!
Reference Issue #10516.
2024-08-11 18:00:13 -04:00
Ryan C. Gordon bec701dd04
pen: Add support for tangential pressure axis. 2024-08-11 18:00:13 -04:00
Anonymous Maarten dc67a51782 sdlprocdump: fix clang -Wincompatible-pointer-types warning 2024-08-11 21:23:57 +02:00
Anonymous Maarten 35b61f70da sdlprocdump: add option to print debug stream 2024-08-11 21:00:08 +02:00
Mathieu Eyraud 5de3d1e9cc Fix error handling of SDL_AddHintCallback 2024-08-11 06:59:10 -07:00
Mathieu Eyraud 45bfa8e5e7 Fix xsettings list copy
If there is only 1 element in the list or memory allocation fails on the 2nd iteration then new->next is uninitialised.
2024-08-11 06:58:03 -07:00
Mathieu Eyraud dcc3dd4c7c Remove stray return statement 2024-08-11 06:57:01 -07:00
Sam Lantinga 15a19bd69f Convert bitmap surface to RGBA for scaling
Scaling bitmaps isn't currently supported, so we convert to RGBA for now.
2024-08-10 16:43:27 -07:00
Ozkan Sezer f93920a4f1 video, x11: fix linkage if SDL_VIDEO_DRIVER_X11_XINPUT2 isn't defined. 2024-08-10 15:55:00 +03:00
Anthony 8a6fd058b4 Update proguard-rules.pro in line with recent changes
Also sort methods and add a note about preserving unused native method nativeGetHint.
2024-08-09 19:18:29 -07:00
SDL Wiki Bot a7fa375275 Sync SDL3 wiki -> header 2024-08-10 02:09:54 +00:00
Ryan C. Gordon b4ca15b654 pen: Added Cocoa backend. 2024-08-09 22:09:23 -04:00
Ryan C. Gordon a9d70dbacb pen: Rework public API.
This changes the API in various ways, and updates the backends for this.

Overall, this is a massive simplification of the API, as most future backends
can't support the previously-offered API.

This also removes the testautomation pen code (not only did these interfaces
change completely, it also did something no other test did: mock the internal
API), and replaces testpen.c with a different implementation (the existing
code was fine, it was just easier to start from scratch than update it).
2024-08-09 22:09:23 -04:00
Sam Lantinga 2b853121fe Allow environment hint overrides before hints are initialized
Fixes https://github.com/libsdl-org/SDL/issues/10514
2024-08-09 13:26:49 -07:00
SDL Wiki Bot 78b1e0e299 Sync SDL3 wiki -> header 2024-08-09 16:57:18 +00:00
Sam Lantinga c2085dad8f Added SDL_HINT_JOYSTICK_GAMEINPUT 2024-08-09 09:56:47 -07:00
Sam Lantinga 0acf8343bb Fixed crash if pipewire doesn't detect any devices and doesn't end up being used.
Fixes https://github.com/libsdl-org/SDL/issues/10511
2024-08-09 08:08:32 -07:00
KaJe e1571d704d Add Cammus C12 VID & PID to wheel device list.
Add Cammus C12 in the SDL wheel list to enable wheel detection for them.
2024-08-09 06:48:14 -07:00
Sam Lantinga 4cc3410dce Added SDL_GetAudioFormatName()
Fixes https://github.com/libsdl-org/SDL/issues/10489
2024-08-08 15:05:37 -07:00
Sam Lantinga 74504e0965 cocoa: removed relative mode handling on focus change
This is now being done at a higher level, so we don't want to duplicate it here.

Fixes the mouse cursor staying hidden if you enable relative mode, alt-tab away and then alt-tab back.
2024-08-08 13:26:50 -07:00
SDL Wiki Bot d2bdfd7792 Sync SDL3 wiki -> header 2024-08-08 17:56:53 +00:00
Frank Praznik ae8065e1ec Use more stringent criteria for entering warp emulation mode
Require more than one warp to the window center within a certain timespan (currently 30ms, but can be tweaked) to better avoid erroneously entering warp emulation mode.

This also correctly resets the warp emulation mode activation if the window loses and regains focus.
2024-08-08 10:56:20 -07:00
Sam Lantinga 1a57ea7fba kmsdrm: free the connector when looking for available devices
Fixes https://github.com/libsdl-org/SDL/issues/10499
2024-08-08 09:28:45 -07:00
Sam Lantinga 058781f514 Include GameInput.h as gameinput.h for compatibility with non-MSVC toolchains 2024-08-08 09:14:38 -07:00
Anonymous Maarten 00b59c96f1 Fix /W3 warnings in examples 2024-08-08 10:11:39 +00:00
Anonymous Maarten 8714de9f46 SDL_GetAudioStreamAvailable and SDL_GetAudioStreamAvailable return error codes 2024-08-08 10:11:39 +00:00
Anonymous Maarten 6e6c2b8e7d cmake: build SDL with /W3 on MSVC
The Visual Studio projects also did this.
2024-08-08 10:11:39 +00:00
Anonymous Maarten 5cd6923298 Assert a valid window pointer instead of dismissing an invalid pointer
Throwing an assertion and breaking the program should allow developers
to catch wrong usage of the API faster.

Follow-up of 9493e6974f
2024-08-08 10:11:39 +00:00
Anonymous Maarten 125ce71379 SDL_Log: avoid sending text to the debug stream twice
When debugging a GUI application in Visual Studio,
text printed with fprintf(stderr) will also be sent to the debug stream.

When buiding SDL with SDL_LIBC=ON, this patch makes logging skip
OutputDebugString and rely on fprintf(stderr) to send the text to
the debugger.
2024-08-08 10:11:39 +00:00
Sylvain bd7d4a3752
Add comment about randomOrder and random seed 2024-08-08 10:21:42 +02:00
Sam Lantinga b5b868044f Include GameInput.h as gameinput.h for compatibility with non-MSVC toolchains 2024-08-07 17:57:33 -07:00
Sam Lantinga 4c3f9159e9 Allow building with older versions of GameInput.h 2024-08-07 17:57:33 -07:00
Sam Lantinga 889a788913 Fixed build warnings 2024-08-07 17:57:33 -07:00
Sam Lantinga a38cd7a067 Added checks for GameInput.h to the build system 2024-08-07 17:57:33 -07:00
Sam Lantinga ae076bdc2a Take the joystick lock when processing GameInput device callbacks 2024-08-07 17:57:33 -07:00
Sam Lantinga 28ef6bcc38 Use the correct timestamp from the GameInput controller reading 2024-08-07 17:57:33 -07:00
Sam Lantinga 5cab979f21 Added support for the Guide and Share buttons on GameInput controllers 2024-08-07 17:57:33 -07:00
Sam Lantinga 3ec19b2a89 Removed duplicate call to SDL_AssertJoysticksLocked() 2024-08-07 17:57:33 -07:00
Sam Lantinga 9493e6974f Validate window pointer before sending events for it
If there are bugs it's possible that the window pointer is invalid. Double check it before sending the application events and potentially dereferencing it.

This showed up in https://github.com/libsdl-org/SDL/issues/10494 as a window getting mouse focus as it was being destroyed and then crashing later when mouse focus was set to a different window.
2024-08-07 12:28:10 -07:00
Sam Lantinga 91d97a367e Fixed crash when the current mouse capture window is destroyed
Fixes https://github.com/libsdl-org/SDL/issues/10494
2024-08-07 12:28:10 -07:00
SDL Wiki Bot 212f7cc355 Sync SDL3 wiki -> header 2024-08-07 19:19:43 +00:00
Sam Lantinga a7e425497b Added a FIXME to lock the joystick list and update the GameInput joystick support 2024-08-07 12:19:09 -07:00
Sam Lantinga 001dbc5da8 Added support for raw mouse and keyboard using GameInput on Windows
Fixes https://github.com/libsdl-org/SDL/issues/10442
2024-08-07 12:19:09 -07:00
Sam Lantinga 8fdca9c691 Clear intermediate errors if we successfully create a window. 2024-08-07 12:17:52 -07:00
Sam Lantinga 66ddabde86 Added an automated test to check creation of minimized and maximized windows 2024-08-07 12:17:52 -07:00
Sylvain 2428d906f1
Remove extra ';' 2024-08-07 19:14:09 +02:00
Anonymous Maarten 7b97fd3b44 SDLDropTarget_Drop: use SDL_strlen instead of strlen 2024-08-07 11:50:22 +02:00
Sylvain a57c566988 Add internal SDL_UpdateTextureFromSurface(), making SDL_CreateTextureFromSurface() lighter 2024-08-07 10:42:47 +02:00
Sylvain 20a6193eaa Run test suites and test cases in non-linear order (see libsdl-org#9303) 2024-08-07 10:25:30 +02:00
Anonymous Maarten 27bb5bcef6 sdlprocdump: fix stacktrace 2024-08-07 06:51:35 +02:00