mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 19:55:19 +00:00
Added DEBUG_STEAM_PROTOCOL for the new Steam Controller
This commit is contained in:
parent
113e97e193
commit
634dff3725
2 changed files with 12 additions and 1 deletions
|
|
@ -29,7 +29,9 @@
|
|||
#ifdef SDL_JOYSTICK_HIDAPI_STEAM
|
||||
|
||||
// Define this if you want to log all packets from the controller
|
||||
// #define DEBUG_STEAM_PROTOCOL
|
||||
#if 0
|
||||
#define DEBUG_STEAM_PROTOCOL
|
||||
#endif
|
||||
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_PAIRING_ENABLED "SDL_JOYSTICK_HIDAPI_STEAM_PAIRING_ENABLED"
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@
|
|||
|
||||
#ifdef SDL_JOYSTICK_HIDAPI_STEAM_TRITON
|
||||
|
||||
// Define this if you want to log all packets from the controller
|
||||
#if 0
|
||||
#define DEBUG_STEAM_PROTOCOL
|
||||
#endif
|
||||
|
||||
/*****************************************************************************************************/
|
||||
|
||||
#include "steam/controller_constants.h"
|
||||
|
|
@ -513,6 +518,10 @@ static bool HIDAPI_DriverSteamTriton_UpdateDevice(SDL_HIDAPI_Device *device)
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_STEAM_PROTOCOL
|
||||
HIDAPI_DumpPacket("Steam Controller packet: size = %d", data, r);
|
||||
#endif
|
||||
|
||||
switch (data[0]) {
|
||||
case ID_TRITON_CONTROLLER_STATE:
|
||||
case ID_TRITON_CONTROLLER_STATE_BLE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue