aboutsummaryrefslogtreecommitdiff
path: root/mp/src/public/steam/isteamcontroller.h
diff options
context:
space:
mode:
Diffstat (limited to 'mp/src/public/steam/isteamcontroller.h')
-rw-r--r--mp/src/public/steam/isteamcontroller.h51
1 files changed, 49 insertions, 2 deletions
diff --git a/mp/src/public/steam/isteamcontroller.h b/mp/src/public/steam/isteamcontroller.h
index 6a97a6fc..5c3d01ab 100644
--- a/mp/src/public/steam/isteamcontroller.h
+++ b/mp/src/public/steam/isteamcontroller.h
@@ -11,7 +11,6 @@
#endif
#include "isteamclient.h"
-#include "steamcontrollerpublic.h"
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
@@ -26,13 +25,61 @@
#pragma pack( pop )
+#define STEAM_RIGHT_TRIGGER_MASK 0x0000001
+#define STEAM_LEFT_TRIGGER_MASK 0x0000002
+#define STEAM_RIGHT_BUMPER_MASK 0x0000004
+#define STEAM_LEFT_BUMPER_MASK 0x0000008
+#define STEAM_BUTTON_0_MASK 0x0000010
+#define STEAM_BUTTON_1_MASK 0x0000020
+#define STEAM_BUTTON_2_MASK 0x0000040
+#define STEAM_BUTTON_3_MASK 0x0000080
+#define STEAM_TOUCH_0_MASK 0x0000100
+#define STEAM_TOUCH_1_MASK 0x0000200
+#define STEAM_TOUCH_2_MASK 0x0000400
+#define STEAM_TOUCH_3_MASK 0x0000800
+#define STEAM_BUTTON_MENU_MASK 0x0001000
+#define STEAM_BUTTON_STEAM_MASK 0x0002000
+#define STEAM_BUTTON_ESCAPE_MASK 0x0004000
+#define STEAM_BUTTON_BACK_LEFT_MASK 0x0008000
+#define STEAM_BUTTON_BACK_RIGHT_MASK 0x0010000
+#define STEAM_BUTTON_LEFTPAD_CLICKED_MASK 0x0020000
+#define STEAM_BUTTON_RIGHTPAD_CLICKED_MASK 0x0040000
+#define STEAM_LEFTPAD_FINGERDOWN_MASK 0x0080000
+#define STEAM_RIGHTPAD_FINGERDOWN_MASK 0x0100000
+#define STEAM_JOYSTICK_BUTTON_MASK 0x0400000
+
+
+#pragma pack( push, 1 )
+
+struct SteamControllerState001_t
+{
+ // If packet num matches that on your prior call, then the controller state hasn't been changed since
+ // your last call and there is no need to process it
+ uint32 unPacketNum;
+
+ // bit flags for each of the buttons
+ uint64 ulButtons;
+
+ // Left pad coordinates
+ short sLeftPadX;
+ short sLeftPadY;
+
+ // Right pad coordinates
+ short sRightPadX;
+ short sRightPadY;
+
+};
+
+#pragma pack( pop )
+
+#define SteamControllerState_t SteamControllerState001_t
+
enum ESteamControllerPad
{
k_ESteamControllerPad_Left,
k_ESteamControllerPad_Right
};
-
//-----------------------------------------------------------------------------
// Purpose: Native Steam controller support API
//-----------------------------------------------------------------------------