Skip to content

Commit b9d01ec

Browse files
committed
Update Steamworks API to 1.6.2
Attempted to follow the instructions in CodeGen/README.md, and then updated the dll/so/dylib files and the info in Version.cs This was done on Windows (and thus there are unfortunately line ending changes in this), so I assume it's preferable to just have someone more connected to the project do it directly on Linux :/ But figured I would try to contribute a version update since I was asking for it in rlabrecque#687 Additionally, some parts of the API seem to have been deprecated/removed - those functions look less common but worth calling out.
1 parent 2ceddb2 commit b9d01ec

39 files changed

+2101
-629
lines changed

CodeGen/steam/isteamapps.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ISteamApps
3939

4040
// Checks if the user is subscribed to the current app through a free weekend
4141
// This function will return false for users who have a retail or other type of license
42-
// Before using, please ask your Valve technical contact how to package and secure your free weekened
42+
// Before using, please ask your Valve technical contact how to package and secure your free weekend
4343
virtual bool BIsSubscribedFromFreeWeekend() = 0;
4444

4545
// Returns the number of DLC pieces for the running app
@@ -112,7 +112,7 @@ class ISteamApps
112112
// set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions
113113
virtual bool SetDlcContext( AppId_t nAppID ) = 0;
114114

115-
// returns total number of known app beta branches (including default "public" branch )
115+
// returns total number of known app branches (including default "public" branch ). nAvailable is number of available betas
116116
virtual int GetNumBetas( int *pnAvailable, int *pnPrivate ) = 0; //
117117

118118
// return beta branch details, name, description, current BuildID and state flags (EBetaBranchFlags)

CodeGen/steam/isteamclient.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//====== Copyright Valve Corporation, All rights reserved. ====================
1+
//====== Copyright Valve Corporation, All rights reserved. ====================
22
//
33
// Internal low-level access to Steamworks interfaces.
44
//

CodeGen/steam/isteamcontroller.h

+5
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,11 @@ enum EControllerActionOrigin
458458
k_EControllerActionOrigin_PS5_LeftFn,
459459
k_EControllerActionOrigin_PS5_RightFn,
460460

461+
k_EControllerActionOrigin_Horipad_M1,
462+
k_EControllerActionOrigin_Horipad_M2,
463+
k_EControllerActionOrigin_Horipad_L4,
464+
k_EControllerActionOrigin_Horipad_R4,
465+
461466
k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
462467
k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
463468
};

CodeGen/steam/isteamfriends.h

+2-45
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,6 @@ enum
116116
k_cwchPersonaNameMax = 32,
117117
};
118118

119-
//-----------------------------------------------------------------------------
120-
// Purpose: user restriction flags
121-
//-----------------------------------------------------------------------------
122-
enum EUserRestriction
123-
{
124-
k_nUserRestrictionNone = 0, // no known chat/content restriction
125-
k_nUserRestrictionUnknown = 1, // we don't know yet (user offline)
126-
k_nUserRestrictionAnyChat = 2, // user is not allowed to (or can't) send/recv any chat
127-
k_nUserRestrictionVoiceChat = 4, // user is not allowed to (or can't) send/recv voice chat
128-
k_nUserRestrictionGroupChat = 8, // user is not allowed to (or can't) send/recv group chat
129-
k_nUserRestrictionRating = 16, // user is too young according to rating in current region
130-
k_nUserRestrictionGameInvites = 32, // user cannot send or recv game invites (e.g. mobile)
131-
k_nUserRestrictionTrading = 64, // user cannot participate in trading (console, mobile)
132-
};
133-
134119
// size limit on chat room or member metadata
135120
const uint32 k_cubChatMetadataMax = 8192;
136121

@@ -202,16 +187,6 @@ class ISteamFriends
202187
// off; it will eventually be free'd or re-allocated
203188
virtual const char *GetPersonaName() = 0;
204189

205-
// Sets the player name, stores it on the server and publishes the changes to all friends who are online.
206-
// Changes take place locally immediately, and a PersonaStateChange_t is posted, presuming success.
207-
//
208-
// The final results are available through the return value SteamAPICall_t, using SetPersonaNameResponse_t.
209-
//
210-
// If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted
211-
// to change the name back, in addition to the SetPersonaNameResponse_t callback.
212-
STEAM_CALL_RESULT( SetPersonaNameResponse_t )
213-
virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0;
214-
215190
// gets the status of the current user
216191
virtual EPersonaState GetPersonaState() = 0;
217192

@@ -357,10 +332,6 @@ class ISteamFriends
357332
virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0;
358333
// returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount)
359334
virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0;
360-
// if current user is chat restricted, he can't send or receive any text/voice chat messages.
361-
// the user can't see custom avatars. But the user can be online and send/recv game invites.
362-
// a chat restricted user can't add friends or join any groups.
363-
virtual uint32 GetUserRestrictions() = 0;
364335

365336
// Rich Presence data is automatically shared between friends who are in the same game
366337
// Each user has a set of Key/Value pairs
@@ -462,7 +433,7 @@ class ISteamFriends
462433
virtual uint32 GetProfileItemPropertyUint( CSteamID steamID, ECommunityProfileItemType itemType, ECommunityProfileItemProperty prop ) = 0;
463434
};
464435

465-
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017"
436+
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends018"
466437

467438
// Global interface accessor
468439
inline ISteamFriends *SteamFriends();
@@ -547,10 +518,6 @@ struct GameLobbyJoinRequested_t
547518
CSteamID m_steamIDLobby;
548519

549520
// The friend they did the join via (will be invalid if not directly via a friend)
550-
//
551-
// On PS3, the friend will be invalid if this was triggered by a PSN invite via the XMB, but
552-
// the account type will be console user so you can tell at least that this was from a PSN friend
553-
// rather than a Steam friend.
554521
CSteamID m_steamIDFriend;
555522
};
556523

@@ -698,17 +665,6 @@ struct FriendsEnumerateFollowingList_t
698665
int32 m_nTotalResultCount;
699666
};
700667

701-
//-----------------------------------------------------------------------------
702-
// Purpose: reports the result of an attempt to change the user's persona name
703-
//-----------------------------------------------------------------------------
704-
struct SetPersonaNameResponse_t
705-
{
706-
enum { k_iCallback = k_iSteamFriendsCallbacks + 47 };
707-
708-
bool m_bSuccess; // true if name change succeeded completely.
709-
bool m_bLocalSuccess; // true if name change was retained locally. (We might not have been able to communicate with Steam)
710-
EResult m_result; // detailed result code
711-
};
712668

713669
//-----------------------------------------------------------------------------
714670
// Purpose: Invoked when the status of unread messages changes
@@ -750,6 +706,7 @@ struct EquippedProfileItems_t
750706
bool m_bHasProfileModifier;
751707
bool m_bHasProfileBackground;
752708
bool m_bHasMiniProfileBackground;
709+
bool m_bFromCache;
753710
};
754711

755712
#pragma pack( pop )

CodeGen/steam/isteamhtmlsurface.h

+50-48
Original file line numberDiff line numberDiff line change
@@ -82,51 +82,53 @@ class ISteamHTMLSurface
8282
// nDelta is pixels of scroll
8383
virtual void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta ) = 0;
8484

85-
enum EMouseCursor
85+
enum EHTMLMouseCursor
8686
{
87-
dc_user = 0,
88-
dc_none,
89-
dc_arrow,
90-
dc_ibeam,
91-
dc_hourglass,
92-
dc_waitarrow,
93-
dc_crosshair,
94-
dc_up,
95-
dc_sizenw,
96-
dc_sizese,
97-
dc_sizene,
98-
dc_sizesw,
99-
dc_sizew,
100-
dc_sizee,
101-
dc_sizen,
102-
dc_sizes,
103-
dc_sizewe,
104-
dc_sizens,
105-
dc_sizeall,
106-
dc_no,
107-
dc_hand,
108-
dc_blank, // don't show any custom cursor, just use your default
109-
dc_middle_pan,
110-
dc_north_pan,
111-
dc_north_east_pan,
112-
dc_east_pan,
113-
dc_south_east_pan,
114-
dc_south_pan,
115-
dc_south_west_pan,
116-
dc_west_pan,
117-
dc_north_west_pan,
118-
dc_alias,
119-
dc_cell,
120-
dc_colresize,
121-
dc_copycur,
122-
dc_verticaltext,
123-
dc_rowresize,
124-
dc_zoomin,
125-
dc_zoomout,
126-
dc_help,
127-
dc_custom,
128-
129-
dc_last, // custom cursors start from this value and up
87+
k_EHTMLMouseCursor_User = 0,
88+
k_EHTMLMouseCursor_None,
89+
k_EHTMLMouseCursor_Arrow,
90+
k_EHTMLMouseCursor_IBeam,
91+
k_EHTMLMouseCursor_Hourglass,
92+
k_EHTMLMouseCursor_WaitArrow,
93+
k_EHTMLMouseCursor_Crosshair,
94+
k_EHTMLMouseCursor_Up,
95+
k_EHTMLMouseCursor_SizeNW,
96+
k_EHTMLMouseCursor_SizeSE,
97+
k_EHTMLMouseCursor_SizeNE,
98+
k_EHTMLMouseCursor_SizeSW,
99+
k_EHTMLMouseCursor_SizeW,
100+
k_EHTMLMouseCursor_SizeE,
101+
k_EHTMLMouseCursor_SizeN,
102+
k_EHTMLMouseCursor_SizeS,
103+
k_EHTMLMouseCursor_SizeWE,
104+
k_EHTMLMouseCursor_SizeNS,
105+
k_EHTMLMouseCursor_SizeAll,
106+
k_EHTMLMouseCursor_No,
107+
k_EHTMLMouseCursor_Hand,
108+
k_EHTMLMouseCursor_Blank, // don't show any custom cursor, just use your default
109+
k_EHTMLMouseCursor_MiddlePan,
110+
k_EHTMLMouseCursor_NorthPan,
111+
k_EHTMLMouseCursor_NorthEastPan,
112+
k_EHTMLMouseCursor_EastPan,
113+
k_EHTMLMouseCursor_SouthEastPan,
114+
k_EHTMLMouseCursor_SouthPan,
115+
k_EHTMLMouseCursor_SouthWestPan,
116+
k_EHTMLMouseCursor_WestPan,
117+
k_EHTMLMouseCursor_NorthWestPan,
118+
k_EHTMLMouseCursor_Alias,
119+
k_EHTMLMouseCursor_Cell,
120+
k_EHTMLMouseCursor_ColResize,
121+
k_EHTMLMouseCursor_CopyCur,
122+
k_EHTMLMouseCursor_VerticalText,
123+
k_EHTMLMouseCursor_RowResize,
124+
k_EHTMLMouseCursor_ZoomIn,
125+
k_EHTMLMouseCursor_ZoomOut,
126+
k_EHTMLMouseCursor_Help,
127+
k_EHTMLMouseCursor_Custom,
128+
k_EHTMLMouseCursor_SizeNWSE,
129+
k_EHTMLMouseCursor_SizeNESW,
130+
131+
k_EHTMLMouseCursor_last, // custom cursors start from this value and up
130132
};
131133

132134
enum EHTMLKeyModifiers
@@ -425,7 +427,7 @@ STEAM_CALLBACK_END(7)
425427
//-----------------------------------------------------------------------------
426428
STEAM_CALLBACK_BEGIN( HTML_SetCursor_t, k_iSteamHTMLSurfaceCallbacks + 22 )
427429
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
428-
STEAM_CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display
430+
STEAM_CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EHTMLMouseCursor to display
429431
STEAM_CALLBACK_END(2)
430432

431433

@@ -434,7 +436,7 @@ STEAM_CALLBACK_END(2)
434436
//-----------------------------------------------------------------------------
435437
STEAM_CALLBACK_BEGIN( HTML_StatusText_t, k_iSteamHTMLSurfaceCallbacks + 23 )
436438
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
437-
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
439+
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the message text
438440
STEAM_CALLBACK_END(2)
439441

440442

@@ -443,7 +445,7 @@ STEAM_CALLBACK_END(2)
443445
//-----------------------------------------------------------------------------
444446
STEAM_CALLBACK_BEGIN( HTML_ShowToolTip_t, k_iSteamHTMLSurfaceCallbacks + 24 )
445447
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
446-
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
448+
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the tooltip text
447449
STEAM_CALLBACK_END(2)
448450

449451

@@ -452,7 +454,7 @@ STEAM_CALLBACK_END(2)
452454
//-----------------------------------------------------------------------------
453455
STEAM_CALLBACK_BEGIN( HTML_UpdateToolTip_t, k_iSteamHTMLSurfaceCallbacks + 25 )
454456
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
455-
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
457+
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the new tooltip text
456458
STEAM_CALLBACK_END(2)
457459

458460

CodeGen/steam/isteaminput.h

+29-7
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,11 @@ enum EInputActionOrigin
482482
k_EInputActionOrigin_SteamDeck_Reserved19,
483483
k_EInputActionOrigin_SteamDeck_Reserved20,
484484

485+
k_EInputActionOrigin_Horipad_M1,
486+
k_EInputActionOrigin_Horipad_M2,
487+
k_EInputActionOrigin_Horipad_L4,
488+
k_EInputActionOrigin_Horipad_R4,
489+
485490
k_EInputActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
486491
k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
487492
};
@@ -643,21 +648,38 @@ struct InputDigitalActionData_t
643648

644649
struct InputMotionData_t
645650
{
646-
// Sensor-fused absolute rotation; will drift in heading toward average
651+
// Gyro Quaternion:
652+
// Absolute rotation of the controller since wakeup, using the Accelerometer reading at startup to determine the first value.
653+
// This means real world "up" is know, but heading is not known.
654+
// Every rotation packet is integrated using sensor time delta, and that change is used to update this quaternion.
655+
// A Quaternion Identity ( x:0, y:0, z:0, w:1 ) will be sent in the first few packets while the controller's IMU is still waking up;
656+
// some controllers have a short "warmup" period before these values should be used.
657+
658+
// After the first time GetMotionData is called per controller handle, the IMU will be active until your app is closed.
659+
// The exception is the Sony Dualshock, which will stay on until the controller has been turned off.
660+
661+
// Filtering: When rotating the controller at low speeds, low level noise is filtered out without noticeable latency. High speed movement is always unfiltered.
662+
// Drift: Gyroscopic "Drift" can be fixed using the Steam Input "Gyro Calibration" button. Users will have to be informed of this feature.
647663
float rotQuatX;
648664
float rotQuatY;
649665
float rotQuatZ;
650666
float rotQuatW;
651667

652668
// Positional acceleration
653-
float posAccelX;
654-
float posAccelY;
655-
float posAccelZ;
669+
// This represents only the latest hardware packet's state.
670+
// Values range from -SHRT_MAX..SHRT_MAX
671+
// This represents -2G..+2G along each axis
672+
float posAccelX; // +tive when controller's Right hand side is pointed toward the sky.
673+
float posAccelY; // +tive when controller's charging port (forward side of controller) is pointed toward the sky.
674+
float posAccelZ; // +tive when controller's sticks point toward the sky.
656675

657676
// Angular velocity
658-
float rotVelX;
659-
float rotVelY;
660-
float rotVelZ;
677+
// Values range from -SHRT_MAX..SHRT_MAX
678+
// These values map to a real world range of -2000..+2000 degrees per second on each axis (SDL standard)
679+
// This represents only the latest hardware packet's state.
680+
float rotVelX; // Local Pitch
681+
float rotVelY; // Local Roll
682+
float rotVelZ; // Local Yaw
661683
};
662684

663685
//-----------------------------------------------------------------------------

CodeGen/steam/isteammatchmaking.h

+2-22
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,6 @@ class ISteamMatchmaking
249249
// link two lobbies for the purposes of checking player compatibility
250250
// you must be the lobby owner of both lobbies
251251
virtual bool SetLinkedLobby( CSteamID steamIDLobby, CSteamID steamIDLobbyDependent ) = 0;
252-
253-
#ifdef _PS3
254-
// changes who the lobby owner is
255-
// you must be the lobby owner for this to succeed, and steamIDNewOwner must be in the lobby
256-
// after completion, the local user will no longer be the owner
257-
virtual void CheckForPSNGameBootInvite( unsigned int iGameBootAttributes ) = 0;
258-
#endif
259252
};
260253
#define STEAMMATCHMAKING_INTERFACE_VERSION "SteamMatchMaking009"
261254

@@ -887,21 +880,8 @@ struct LobbyCreated_t
887880
// used by now obsolete RequestFriendsLobbiesResponse_t
888881
// enum { k_iCallback = k_iSteamMatchmakingCallbacks + 14 };
889882

890-
891-
//-----------------------------------------------------------------------------
892-
// Purpose: Result of CheckForPSNGameBootInvite
893-
// m_eResult == k_EResultOK on success
894-
// at this point, the local user may not have finishing joining this lobby;
895-
// game code should wait until the subsequent LobbyEnter_t callback is received
896-
//-----------------------------------------------------------------------------
897-
struct PSNGameBootInviteResult_t
898-
{
899-
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 15 };
900-
901-
bool m_bGameBootInviteExists;
902-
CSteamID m_steamIDLobby; // Should be valid if m_bGameBootInviteExists == true
903-
};
904-
883+
// used by now obsolete PSNGameBootInviteResult_t
884+
// enum { k_iCallback = k_iSteamMatchmakingCallbacks + 15 };
905885

906886
//-----------------------------------------------------------------------------
907887
// Purpose: Result of our request to create a Lobby

0 commit comments

Comments
 (0)