Commit Graph

10757 Commits (d2300516c3998277c993fd4ac336fbb4ba71641a)

Author SHA1 Message Date
Sam Lantinga 21100006ad Don't conflict with usage of stdout as a stdio macro
Patch inspired by http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/devel/SDL2/patches/patch-src_video_wayland_SDL__waylandmessagebox.c?rev=1.1&content-type=text/plain
2022-07-30 16:22:24 -07:00
Cameron Cawley 6e9a606a8e Add more mingw-w64 build workflows 2022-07-30 14:37:41 -07:00
Cameron Cawley 3bdc10f842 Update the list of required Ubuntu packages, and add Ubuntu 22.04 workflows 2022-07-30 13:07:54 -07:00
Cameron Cawley adb3e1a21d Add FreeBSD builds to GitHub Actions 2022-07-30 09:23:50 -07:00
Frank Praznik 22f25b03d9 core: linux: Favor xdg-desktop-portal for elevating thread priority
Use the xdg-desktop-portal interface to RealtimeKit1, when available, to set realtime scheduling and elevated priority for threads.  This portal allows for the use of rtkit within containers such as Flatpak.  It will fall back to using RealtimeKit1 directly if the xdg-desktop-portal interface is too old or not available.
2022-07-30 08:38:22 -07:00
Sam Lantinga 2241bd669f Added a command line option `--info event_motion` to show mouse and finger motion events 2022-07-29 20:37:38 -07:00
Sam Lantinga 13e0c40ec2 Added mapping for the 8BitDo Pro 2 controller in DirectInput mode over Bluetooth on Linux 2022-07-29 17:28:36 -07:00
Sam Lantinga 62c831661c Added mapping for the 8BitDo Pro 2 controller in DirectInput mode 2022-07-29 17:14:55 -07:00
Sam Lantinga 41c363f7d6 Note that the PDP Versus Fighting Pad is an arcade fighting pad 2022-07-29 16:29:25 -07:00
SDL Wiki Bot 47265f377f Sync SDL wiki -> header 2022-07-29 13:24:05 +00:00
Anonymous Maarten 36dfbe5d66 stdlib: exclude mslibc functions using SDL_STATIC_LIB macro 2022-07-29 15:05:19 +02:00
Anonymous Maarten f8aa00d198 cmake: add HAVE_STDDEF_H to SDL_config.h.cmake 2022-07-29 15:05:19 +02:00
Anonymous Maarten 83f5bbdf25 cmake: define SDL_STATIC_LIB for static SDL2 library 2022-07-29 15:05:19 +02:00
Anonymous Maarten bdd1d035b7 cmake: Don't add /NODEFAULTLIB to link flags when building SDL-static 2022-07-29 15:05:19 +02:00
Sam Lantinga 181877ebeb Added SDL_hidapi_combined.c to the Xcode project 2022-07-28 21:54:34 -07:00
Sam Lantinga f3c1194c0f Removed obsolete comment 2022-07-28 21:50:41 -07:00
Sam Lantinga aee179e46f Removed debug output 2022-07-28 21:50:20 -07:00
Sam Lantinga d8fd78736b Added entry for the Nintendo Switch Joy-Con controller pair 2022-07-28 21:44:23 -07:00
Sam Lantinga 875b737c64 Added support for the Nintendo Online NES Controllers to the HIDAPI driver 2022-07-28 21:40:01 -07:00
Xiaofeng Wang 45c1cc8177 Compatible with including as <SDL2/SDL.h> 2022-07-28 20:34:34 -07:00
Sam Lantinga ab967475c6 Greatly improved Nintendo Joy-Con support using the HIDAPI driver
* Added support for mini-gamepad mode for Joy-Con controllers, matching the mapping for hid-nintendo on Linux and iOS 16
* Added the ability to merge left and right Joy-Con controllers into a single Pro-style controller
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_COMBINE_JOY_CONS to control this merging functionality
* Removed the hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS
2022-07-28 19:38:38 -07:00
Sam Lantinga dfed862a66 Fixed variable shadow warning 2022-07-28 19:35:46 -07:00
Sam Lantinga 2fa2f9ff77 Greatly improved Nintendo Joy-Con support using the HIDAPI driver
* Added support for mini-gamepad mode for Joy-Con controllers, matching the mapping for hid-nintendo on Linux and iOS 16
* Added the ability to merge left and right Joy-Con controllers into a single Pro-style controller
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_COMBINE_JOY_CONS to control this merging functionality
* Removed the hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS
2022-07-28 19:22:27 -07:00
Sam Lantinga def60ce6fe Fixed the name of the HIDAPI Joy-Con controller for consistency with other drivers 2022-07-27 19:20:42 -07:00
Sam Lantinga 0f1be9401f Updated mapping for Joy-Con controllers using hid-nintendo
This matches the mapping on iOS 16 and will match the HIDAPI
implementation.
2022-07-27 17:32:51 -07:00
Sam Lantinga 756978a236 Left and right single Joy-Con controllers are mapped as individual mini controllers 2022-07-27 16:17:32 -07:00
Sam Lantinga 4990bd0517 Added debug code to show available inputs on iOS/tvOS controllers 2022-07-27 16:17:32 -07:00
Anonymous Maarten 65473ae36d autoconf: use ax_compute_relative_paths 2022-07-27 21:06:31 +02:00
Sam Lantinga dbf7940541 Enable capturing raw Xinput2 touch events and use to flag global mouse state as dirty
- Touch events may be translated to mouse movement events without the normal Xinput2 raw motion events
  being sent. Not all touch events will necessarily move the mouse but this ensures we update the global
  mouse state just in case.

- Fix up some formatting

CR: saml
2022-07-27 10:31:24 -07:00
Ryan C. Gordon 42165fe8d1
kmsdrm: slightly better device index hint parsing. 2022-07-27 12:12:36 -04:00
Anonymous Maarten 02c8747176 math.h does not always provide M_PI
This fixes the following error when building with SDL_LIBC:
SDL\test\testautomation_math.c(1965): error C2065: 'M_PI': undeclared identifier
2022-07-27 09:10:18 -07:00
Anonymous Maarten 5da85376b9 stdlib: move all mslibc functions to SDL_mslibc.c
This allows disabling LTO on them by only specifying a single file.
2022-07-27 09:07:56 -07:00
Sam Lantinga a169259f62 Actually we don't need to unlock to send k_eSwitchProprietaryCommandIDs_ForceUSB since we don't wait for reply 2022-07-27 09:05:02 -07:00
Sam Lantinga c51464d9d8 Put the Nintendo Switch Pro controller back into enhanced mode as needed
Fixes https://github.com/libsdl-org/SDL/issues/3450
2022-07-27 09:00:39 -07:00
Anonymous Maarten 5c70e45c53 cmake: don't use result of 'find_library' for Android libraries 2022-07-26 14:24:36 -07:00
Anonymous Maarten 430c39082f ci: test 'sdl2-config --static-libs' + 'pkg-config sdl2 --static' on ci 2022-07-26 14:24:36 -07:00
Anonymous Maarten 4690689a4c cmake: on Apple, don't use find_library for frameworks + use EXTRA_LDFLAGS 2022-07-26 14:24:36 -07:00
Sam Lantinga 613ce7850e Fixed interpreting SDL_KMSDRM_DEVICE_INDEX="" as index 0 2022-07-26 13:34:27 -07:00
Pierre Wendling 36d456797b CI: Fix CMake workflow.
- Add quotes the OSX_ARCHITECTURES list.
- Extract the flag in the matrix.
2022-07-26 23:05:55 +03:00
Ryan C. Gordon cc982ea7a7 kmsdrm: let device indexes be > 2 digits. 2022-07-26 15:43:34 -04:00
Pierre Wendling c37c1f7ac3 CI: Make macOS universal build with CMake. 2022-07-26 12:30:14 -07:00
diddily 1f276a5148 Fix Main Thread Checker warning on macOS
Cache off NSWindow's windowNumber in SDL_WindowData on setup and use that in `Cocoa_SendWakeupEvent` to prevent accessing windowNumber off the main  thread.
2022-07-26 15:17:44 -04:00
Ryan C. Gordon 31d38f2f30
WhatsNew.txt: Note that minimum macOS version is now 10.9. 2022-07-26 15:14:37 -04:00
Ryan C. Gordon 542a4da3d6
kmsdrm: check SDL_HINT_KMSDRM_DEVICE_INDEX hint in dri_getindex().
Otherwise, it would work for Init but not Available.
2022-07-26 15:11:19 -04:00
Ryan C. Gordon 218c3dbb34
cocoa: Don't crash if moving a message box created before SDL_Init.
Fixes #5928.
2022-07-26 14:45:26 -04:00
Sam Lantinga f789bc7d5f Updated minimum OS targets on Apple platforms to match supported platforms using Xcode 13 2022-07-26 11:36:01 -07:00
Ryan C. Gordon 8ff738f234
audio: Report SDL_AUDIODEVICEREMOVED for unopened devices.
Unopened devices, if removed, now send SDL_AUDIODEVICEREMOVED events with
a `which` field set to zero. Apps can use this to decide if they need to
refresh a list of devices being shown in an options menu, etc.

It's safe to call SDL_CloseAudioDevice(0), so even if they try to clean
up this bogus id, it should be safe.

Fixes #5199.
2022-07-26 12:40:47 -04:00
Ryan C. Gordon 5d85c7d300
kmsdrm: Added a hint to specify device index.
Fixes #2811.
2022-07-26 00:19:54 -04:00
Ryan C. Gordon 20a76b0e3e
video: removed unused devindex argument from bootstrap's create method. 2022-07-26 00:19:52 -04:00
Sam Lantinga cbb3f4ca37 Add SDL_guid.h to the global SDL header 2022-07-25 19:53:04 -07:00