Ozkan Sezer
714502d373
minor windows warning fixes.
2022-06-13 22:15:56 +03:00
Sam Lantinga
68544be44b
Added support for the Nintendo Online controllers
2022-06-10 11:31:59 -07:00
Sam Lantinga
9202df0472
Implemented SDL_GameControllerGetFirmwareVersion() for HIDAPI PS5 controllers
2022-06-09 18:11:34 -07:00
Sam Lantinga
c7f4103807
Special case for k_eControllerType_XInputSwitchController in the raw input path
2022-06-09 13:47:29 -07:00
Sam Lantinga
e6cb082232
Fixed the default mapping on Windows for the HORI Fighting Commander
2022-06-09 13:20:38 -07:00
Sam Lantinga
d58d637ac6
Added support for the Qanba Obsidian Arcade Joystick on Linux
2022-06-08 11:07:36 -07:00
Christoph Reichenbach
3a20274ddf
Refactoring: move GUID operations out of Joystick
...
- SDL_JoystickGUID -> SDL_GUID (though we retain a type alias)
- Operations for GUID <-> String ops are now in
src/SDL_guid.c and include/SDL_guid.h
- The corresponding Joystick operations delegate to SDL_guid.c
- Added test/testguid.c
2022-06-04 17:22:13 -07:00
Sam Lantinga
423141bfca
Added a function to get the controller firmware version
2022-06-03 18:50:00 -07:00
Sam Lantinga
17410887d0
Separated controller type data into a C file
2022-06-03 15:03:08 -07:00
Sam Lantinga
7fa46ec40b
The Google Pixel fingerprint sensor also shows up on Linux when running on the phone
2022-05-31 11:11:19 -07:00
Sam Lantinga
d2c4d74dd0
Fixed build with MinGW-64 windows.devices.power.h
...
The MinGW-64 header defines the parameters as ABI::Windows::Foundation::IReference<INT32 > **, but the Windows header defines the parameters as __FIReference_1_int**
2022-05-27 15:49:35 -07:00
Sam Lantinga
bd22ca762e
Revert "Workaround for compiling with MinGW-w64"
...
This reverts commit efdf43aa9b
.
The broken mingw headers aren't in an official release yet, so reporting this upstream.
2022-05-27 15:40:50 -07:00
Sam Lantinga
efdf43aa9b
Workaround for compiling with MinGW-w64
...
Fixes bug https://github.com/libsdl-org/SDL/issues/5589
2022-05-27 15:34:45 -07:00
Sam Lantinga
b28d304b23
Only include controller_type.h in SDL_joystick.c
...
It has a huge array of controllers and we only want it instantiated once
2022-05-24 17:24:54 -07:00
Sam Lantinga
b1cf322971
Fixed HIDAPI PS4 controller being picked up when running under Steam
...
Input with PS4 configuration enabled
2022-05-19 16:50:59 -07:00
Sam Lantinga
47f1cb550d
Fixed picking up the correct mapping for virtual controllers on Android
...
Fixes https://github.com/libsdl-org/SDL/issues/5662
2022-05-18 23:48:15 -07:00
Sam Lantinga
f7b774a7e0
Fixed build error on Linux if HAVE_INOTIFY isn't defined
...
Fixes https://github.com/libsdl-org/SDL/issues/5682
2022-05-18 17:59:17 -07:00
Cameron Cawley
0cca71a846
Use SDLCALL for callbacks in public APIs
2022-05-18 15:01:27 -07:00
Sam Lantinga
1f2a241688
Add new virtual joysticks to the end of the list
...
This guarantees that the device index that's returned is stable, as long as no joystick hotplug events occur.
2022-05-16 09:02:35 -07:00
Sam Lantinga
3c3ccb1d48
Fixed crash if a virtual joystick was disconnected
2022-05-16 08:56:17 -07:00
Sam Lantinga
48b6cd8bc2
Fixed whitespace
2022-05-16 07:23:30 -07:00
Sam Lantinga
f0bc5c9cbf
Added effects support for virtual controllers
2022-05-16 07:21:28 -07:00
Sam Lantinga
b3a18706ee
Removed unused variables
2022-05-16 06:37:38 -07:00
Sam Lantinga
7e005bd843
Fixed mapping the paddle buttons with the virtual controller
2022-05-16 06:22:18 -07:00
Sam Lantinga
bfac54b59c
Added the ability to specify which buttons and axes are present for virtual controllers
2022-05-15 20:34:44 -07:00
Sam Lantinga
94eeb587c1
First pass at extending virtual controller functionality
...
Added the ability to specify a name and the product VID/PID for a virtual controller
Also added a test case to testgamecontroller, if you pass --virtual as a parameter
2022-05-15 20:01:12 -07:00
Sam Lantinga
7ad15c5b8f
Added game controller support for virtual joysticks
...
Fixes https://github.com/libsdl-org/SDL/issues/5662
2022-05-15 09:35:52 -07:00
Sam Lantinga
a3c1ca1fa1
Added support for the Backbone One guide button
...
The guide button is activated on a long press (> 400ms)
2022-05-06 09:07:36 -07:00
Ozkan Sezer
3f813cf1ef
SDL_rawinputjoystick.c: fixed -Werror=declaration-after-statement
2022-05-04 10:05:56 +03:00
atfrase
db9e14e504
disabled linux joystick debugging outputs and reverted unnecessary comment edit
2022-05-03 10:44:09 -07:00
atfrase
3b53555bcf
copied default Steam Controller mapping for wired and wireless-dongle USB pids
2022-05-03 10:44:09 -07:00
atfrase
13b1bf4f21
added default gamepad mapping for Steam Controller with new GUID (possibly caused by the firmware update to enable BLE?)
2022-05-03 10:44:09 -07:00
atfrase
f7a19f9ea8
relaxed the digital hat deadzone slightly, and fixed typo in DEBUG_GAMEPAD_MAPPING define
2022-05-03 10:44:09 -07:00
atfrase
3696e23d09
added hints SDL_HINT_LINUX_DIGITAL_HATS and SDL_HINT_LINUX_HAT_DEADZONES to control the new Linux hat handling; added define DEBUG_GAMEPAD_MAPPINGS to log messages when generating default gamepad mapings for Linux joysticks
2022-05-03 10:44:09 -07:00
atfrase
0b8e796e2c
added hueristic to differentiate digital vs analog 'hat' input axes and expose the latter as regular axes; added automatic deadzones to hat outputs, in case analog axes are still mapped to digital hats; updated automatic gamepad control mapping to more completely follow the spec
2022-05-03 10:44:09 -07:00
Daniel Brookman
d1a3981bf8
Fix crash when reading background events for MFi controllers on macOS
...
Enabling GCController.shouldMonitorBackgroundEvents to read background events
for MFi controllers before receiving the first GCControllerDidConnectNotification
is apparently a no-go on macOS (12.3.1 for me), and would crash on attempt.
Apple's documentation is... not great, and doesn't point this out.
This waits for IOS_AddMFIJoystickDevice() to get called down the chain from GCControllerDidConnectNotification, and enables GCController.shouldMonitorBackgroundEvents
if it hadn't been already.
On iOS and tvOS, GCController.shouldMonitorBackgroundEvents is ignored, so
there's no need to check their versions.
2022-05-02 15:31:28 -07:00
Jan200101
bb0b6dd42e
Fixed using WGI without XInput
2022-05-02 11:33:55 -07:00
Carl Friess
2ccb0dfd16
Check for macOS 10.16 to support apps built with older macOS SDKs
2022-04-29 00:24:23 -07:00
Sam Lantinga
e551384a99
Added functions to get the platform dependent name for a joystick or game controller
2022-04-26 14:54:14 -07:00
Jibb Smart
d7c07d6b09
Read motion sensor scale from Switch controllers ( #5555 )
...
* Read IMU scale data from Switch controllers. Up until now, SDL has used hard-coded scaling which isn't correct with some supported controllers.
* Moved declarations to beginning of code blocks to better fit with SDL style requirements
2022-04-26 09:57:17 -07:00
Dimitriy Ryazantcev
c39df2fb0c
joystick: get HID top-level collection preparsed data directly from RawInput API.
2022-04-26 09:48:35 -07:00
Mathieu Eyraud
0b2a55ea7d
Fix typo
2022-04-25 15:46:17 -07:00
meyraud705
3dcfe86082
Add joystick battery event
2022-04-25 15:46:17 -07:00
meyraud705
0964c84d77
Always use SDL_PrivateJoystickBatteryLevel to update battery level
...
But do not use it for initialisation.
2022-04-25 15:46:17 -07:00
Sam Lantinga
8986efd643
Added support for the Backbone One controller on iOS
2022-04-22 14:21:46 -07:00
Sam Lantinga
2ca0837888
SDL: sometimes the PS5 controller doesn't report having to power even when connected over USB. Possibly related to being completely charged? Either way we already know that it's USB or BT so let's use the driver's knowledge instead.
2022-04-22 14:21:41 -07:00
Sam Lantinga
04bf7c9434
Fixed build
2022-04-22 09:36:39 -07:00
Sam Lantinga
d9b5805ba5
Return a correlation error when trigger rumble is attempted without correlation
2022-04-22 09:13:40 -07:00
Cameron Gutman
145824f6ab
WGI: Only call RoUninitialize() if RoInitialize() succeeded
2022-04-21 08:47:22 -07:00
Cameron Gutman
00b2e10a7a
WGI: Keep a reference to the MTA to avoid crashing on COM teardown
...
Fixes #5552
Fixes #5270
2022-04-21 08:47:22 -07:00