diff --git a/Readme.txt b/Readme.txt index c3e97f0..2a13a25 100644 --- a/Readme.txt +++ b/Readme.txt @@ -8,6 +8,19 @@ Copyright Welcome to the Steamworks SDK. For documentation please see our partner website at: http://partner.steamgames.com +---------------------------------------------------------------- +v1.57 28th April 2022 +---------------------------------------------------------------- +User +* Updated ISteamUser::GetAuthTicketForWebApi(), To create a ticket for use by the AuthenticateUserTicket Web API +* Updated ISteamUser::GetAuthSessionTicket(), No longer to be used to create a ticket for use by the AuthenticateUserTicket Web API + +---------------------------------------------------------------- +v1.56 30th March 2023 +---------------------------------------------------------------- +User +* Updated ISteamUser::GetAuthSessionTicket(), Add parameter SteamNetworkingIdentity + ---------------------------------------------------------------- v1.55 29th July 2022 ---------------------------------------------------------------- diff --git a/SteamworksExample/MainMenu.cpp b/SteamworksExample/MainMenu.cpp index 1256ebf..20eacfb 100644 --- a/SteamworksExample/MainMenu.cpp +++ b/SteamworksExample/MainMenu.cpp @@ -43,7 +43,8 @@ void CMainMenu::SetupMenu() AddMenuItem( MenuItem_t( "Friends List", k_EClientFriendsList ) ); AddMenuItem( MenuItem_t( "Group chat room", k_EClientClanChatRoom ) ); } - AddMenuItem( MenuItem_t( "Remote Play", k_EClientRemotePlay ) ); + AddMenuItem( MenuItem_t( "Remote Play Invite", k_EClientRemotePlayInvite ) ); + AddMenuItem( MenuItem_t( "Remote Play Sessions", k_EClientRemotePlaySessions ) ); AddMenuItem( MenuItem_t( "Remote Storage", k_EClientRemoteStorage ) ); AddMenuItem( MenuItem_t( "Write Minidump", k_EClientMinidump ) ); diff --git a/SteamworksExample/SpaceWar.h b/SteamworksExample/SpaceWar.h index 5ac2deb..7b7b95c 100644 --- a/SteamworksExample/SpaceWar.h +++ b/SteamworksExample/SpaceWar.h @@ -187,7 +187,8 @@ enum EClientGameState k_EClientWorkshop, k_EClientHTMLSurface, k_EClientInGameStore, - k_EClientRemotePlay, + k_EClientRemotePlayInvite, + k_EClientRemotePlaySessions, k_EClientOverlayAPI, }; diff --git a/SteamworksExample/SpaceWarClient.cpp b/SteamworksExample/SpaceWarClient.cpp index 3644dc1..7e62b38 100644 --- a/SteamworksExample/SpaceWarClient.cpp +++ b/SteamworksExample/SpaceWarClient.cpp @@ -1226,7 +1226,12 @@ void CSpaceWarClient::OnGameStateChanged( EClientGameState eGameStateNew ) pchSteamRichPresenceDisplay = SetInGameRichPresence(); bDisplayScoreInRichPresence = true; } - else if ( m_eGameState == k_EClientRemotePlay ) + else if ( m_eGameState == k_EClientRemotePlayInvite ) + { + SteamRemotePlay()->BSendRemotePlayTogetherInvite( CSteamID() ); + SetGameState( k_EClientGameMenu ); + } + else if ( m_eGameState == k_EClientRemotePlaySessions ) { // we've switched to the remote play menu m_pRemotePlayList->Show(); @@ -1641,7 +1646,7 @@ void CSpaceWarClient::RunFrame() SetGameState( k_EClientGameMenu ); break; - case k_EClientRemotePlay: + case k_EClientRemotePlaySessions: m_pStarField->Render(); m_pRemotePlayList->RunFrame(); @@ -2597,6 +2602,18 @@ void CSpaceWarClient::OnWorkshopItemInstalled( ItemInstalled_t *pParam ) } +//----------------------------------------------------------------------------- +// Purpose: Remote Play Together guest invite was created +//----------------------------------------------------------------------------- +void CSpaceWarClient::OnSteamRemotePlayTogetherGuestInvite( SteamRemotePlayTogetherGuestInvite_t *pParam ) +{ + char rgch[ 1024 ]; + sprintf_safe( rgch, "Remote Play Together guest invite URL: %s\n", + pParam->m_szConnectURL ); + OutputDebugString( rgch ); +} + + //----------------------------------------------------------------------------- // Purpose: duration control / anti indulgence callback notification for Steam China // (this can run from an API call, or from an asynchronous callback. see OnDurationControlCallResult) diff --git a/SteamworksExample/SpaceWarClient.h b/SteamworksExample/SpaceWarClient.h index 77c4e24..6e64af5 100644 --- a/SteamworksExample/SpaceWarClient.h +++ b/SteamworksExample/SpaceWarClient.h @@ -490,6 +490,9 @@ private: void OnUGCQueryCompleted( SteamUGCQueryCompleted_t *pParam, bool bIOFailure ); CCallResult m_SteamCallResultUGCQueryCompleted; + // callback when a Remote Play Together guest invite has been created + STEAM_CALLBACK( CSpaceWarClient, OnSteamRemotePlayTogetherGuestInvite, SteamRemotePlayTogetherGuestInvite_t ); + // Steam China support. duration control callback can be posted asynchronously, but we also // call it directly. STEAM_CALLBACK( CSpaceWarClient, OnDurationControl, DurationControl_t ); diff --git a/public/steam/isteaminput.h b/public/steam/isteaminput.h index 1dafe88..9b30278 100644 --- a/public/steam/isteaminput.h +++ b/public/steam/isteaminput.h @@ -805,6 +805,12 @@ public: // Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks STEAM_CALL_BACK( SteamInputDeviceDisconnected_t ) + // Controllers using Gamepad emulation (XInput, DirectInput, etc) will be seated in the order that + // input is sent by the device. This callback will fire on first input for each device and when the + // a user has manually changed the order via the Steam overlay. This also has the device type info + // so that you can change out glyph sets without making additional API calls + STEAM_CALL_BACK( SteamInputGamepadSlotChange_t ) + // Enable SteamInputActionEvent_t callbacks. Directly calls your callback function // for lower latency than standard Steam callbacks. Supports one callback at a time. // Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks @@ -1009,6 +1015,20 @@ struct SteamInputConfigurationLoaded_t bool m_bUsesGamepadAPI; // Does the configuration contain any Xinput bindings? }; +//----------------------------------------------------------------------------- +// Purpose: called when controller gamepad slots change - on Linux/macOS these +// slots are shared for all running apps. +//----------------------------------------------------------------------------- +struct SteamInputGamepadSlotChange_t +{ + enum { k_iCallback = k_iSteamControllerCallbacks + 4 }; + AppId_t m_unAppID; + InputHandle_t m_ulDeviceHandle; // Handle for device + ESteamInputType m_eDeviceType; // Type of device + int m_nOldGamepadSlot; // Previous GamepadSlot - can be -1 controller doesn't uses gamepad bindings + int m_nNewGamepadSlot; // New Gamepad Slot - can be -1 controller doesn't uses gamepad bindings +}; + #pragma pack( pop ) #endif // ISTEAMINPUT_H diff --git a/public/steam/isteamremoteplay.h b/public/steam/isteamremoteplay.h index 9c2dafb..569c235 100644 --- a/public/steam/isteamremoteplay.h +++ b/public/steam/isteamremoteplay.h @@ -51,7 +51,7 @@ public: // This is set to 0x0 if the resolution is not available virtual bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, int *pnResolutionX, int *pnResolutionY ) = 0; - // Invite a friend to Remote Play Together + // Invite a friend to Remote Play Together, or create a guest invite if steamIDFriend is empty // This returns false if the invite can't be sent virtual bool BSendRemotePlayTogetherInvite( CSteamID steamIDFriend ) = 0; }; @@ -82,6 +82,11 @@ STEAM_CALLBACK_BEGIN( SteamRemotePlaySessionDisconnected_t, k_iSteamRemotePlayCa STEAM_CALLBACK_END( 0 ) +STEAM_CALLBACK_BEGIN( SteamRemotePlayTogetherGuestInvite_t, k_iSteamRemotePlayCallbacks + 3 ) + STEAM_CALLBACK_MEMBER_ARRAY( 0, char, m_szConnectURL, 1024 ) +STEAM_CALLBACK_END( 0 ) + + #pragma pack( pop ) diff --git a/public/steam/isteamuser.h b/public/steam/isteamuser.h index f949b68..182f02e 100644 --- a/public/steam/isteamuser.h +++ b/public/steam/isteamuser.h @@ -127,8 +127,14 @@ public: // SteamNetworkingIdentity is an optional input parameter to hold the public IP address or SteamID of the entity you are connecting to // if an IP address is passed Steam will only allow the ticket to be used by an entity with that IP address // if a Steam ID is passed Steam will only allow the ticket to be used by that Steam ID + // not to be used for "ISteamUserAuth\AuthenticateUserTicket" - it will fail virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket, const SteamNetworkingIdentity *pSteamNetworkingIdentity ) = 0; + // Request a ticket which will be used for webapi "ISteamUserAuth\AuthenticateUserTicket" + // pchIdentity is an optional input parameter to identify the service the ticket will be sent to + // the ticket will be returned in callback GetTicketForWebApiResponse_t + virtual HAuthTicket GetAuthTicketForWebApi( const char *pchIdentity ) = 0; + // Authenticate ticket from entity steamID to be sure it is valid and isnt reused // Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse ) virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0; @@ -213,7 +219,7 @@ public: }; -#define STEAMUSER_INTERFACE_VERSION "SteamUser022" +#define STEAMUSER_INTERFACE_VERSION "SteamUser023" // Global interface accessor inline ISteamUser *SteamUser(); @@ -354,7 +360,6 @@ struct GetAuthSessionTicketResponse_t EResult m_eResult; }; - //----------------------------------------------------------------------------- // Purpose: sent to your game in response to a steam://gamewebcallback/ command //----------------------------------------------------------------------------- @@ -415,6 +420,20 @@ struct DurationControl_t }; +//----------------------------------------------------------------------------- +// callback for GetTicketForWebApi +//----------------------------------------------------------------------------- +struct GetTicketForWebApiResponse_t +{ + enum { k_iCallback = k_iSteamUserCallbacks + 68 }; + HAuthTicket m_hAuthTicket; + EResult m_eResult; + int m_cubTicket; + static const int k_nCubTicketMaxLength = 2560; + uint8 m_rgubTicket[k_nCubTicketMaxLength]; +}; + + #pragma pack( pop ) #endif // ISTEAMUSER_H diff --git a/public/steam/lib/linux32/libsdkencryptedappticket.so b/public/steam/lib/linux32/libsdkencryptedappticket.so index 2ec9bd8..b5bd0ac 100644 Binary files a/public/steam/lib/linux32/libsdkencryptedappticket.so and b/public/steam/lib/linux32/libsdkencryptedappticket.so differ diff --git a/public/steam/lib/linux64/libsdkencryptedappticket.so b/public/steam/lib/linux64/libsdkencryptedappticket.so index fe77ac2..a087cf8 100644 Binary files a/public/steam/lib/linux64/libsdkencryptedappticket.so and b/public/steam/lib/linux64/libsdkencryptedappticket.so differ diff --git a/public/steam/lib/osx/libsdkencryptedappticket.dylib b/public/steam/lib/osx/libsdkencryptedappticket.dylib index 6e785d4..0c782d2 100644 Binary files a/public/steam/lib/osx/libsdkencryptedappticket.dylib and b/public/steam/lib/osx/libsdkencryptedappticket.dylib differ diff --git a/public/steam/lib/win32/sdkencryptedappticket.dll b/public/steam/lib/win32/sdkencryptedappticket.dll index 1aad7bf..c901edf 100644 Binary files a/public/steam/lib/win32/sdkencryptedappticket.dll and b/public/steam/lib/win32/sdkencryptedappticket.dll differ diff --git a/public/steam/lib/win32/sdkencryptedappticket.lib b/public/steam/lib/win32/sdkencryptedappticket.lib index 6f028f5..9bd4fc5 100644 Binary files a/public/steam/lib/win32/sdkencryptedappticket.lib and b/public/steam/lib/win32/sdkencryptedappticket.lib differ diff --git a/public/steam/lib/win64/sdkencryptedappticket64.dll b/public/steam/lib/win64/sdkencryptedappticket64.dll index 1fd4d50..9c0bf44 100644 Binary files a/public/steam/lib/win64/sdkencryptedappticket64.dll and b/public/steam/lib/win64/sdkencryptedappticket64.dll differ diff --git a/public/steam/lib/win64/sdkencryptedappticket64.lib b/public/steam/lib/win64/sdkencryptedappticket64.lib index d77b909..15945f1 100644 Binary files a/public/steam/lib/win64/sdkencryptedappticket64.lib and b/public/steam/lib/win64/sdkencryptedappticket64.lib differ diff --git a/public/steam/steam_api.json b/public/steam/steam_api.json index 82fdfaf..2e18c6c 100644 --- a/public/steam/steam_api.json +++ b/public/steam/steam_api.json @@ -125,6 +125,16 @@ ], "struct": "DurationControl_t" }, + { + "callback_id": 168, + "fields": [ + { "fieldname":"m_hAuthTicket", "fieldtype":"HAuthTicket" }, + { "fieldname":"m_eResult", "fieldtype":"EResult" }, + { "fieldname":"m_cubTicket", "fieldtype":"int" }, + { "fieldname":"m_rgubTicket", "fieldtype":"uint8 [2560]" } + ], + "struct": "GetTicketForWebApiResponse_t" + }, { "callback_id": 304, "fields": [ @@ -1201,6 +1211,17 @@ ], "struct": "SteamInputConfigurationLoaded_t" }, + { + "callback_id": 2804, + "fields": [ + { "fieldname":"m_unAppID", "fieldtype":"AppId_t" }, + { "fieldname":"m_ulDeviceHandle", "fieldtype":"InputHandle_t" }, + { "fieldname":"m_eDeviceType", "fieldtype":"ESteamInputType" }, + { "fieldname":"m_nOldGamepadSlot", "fieldtype":"int" }, + { "fieldname":"m_nNewGamepadSlot", "fieldtype":"int" } + ], + "struct": "SteamInputGamepadSlotChange_t" + }, { "callback_id": 3401, "fields": [ @@ -1691,6 +1712,13 @@ ], "struct": "SteamRemotePlaySessionDisconnected_t" }, + { + "callback_id": 5703, + "fields": [ + { "fieldname":"m_szConnectURL", "fieldtype":"char [1024]" } + ], + "struct": "SteamRemotePlayTogetherGuestInvite_t" + }, { "callback_id": 1251, "fields": [ @@ -4570,7 +4598,7 @@ { "kind": "user", "name": "SteamUser", - "name_flat": "SteamAPI_SteamUser_v022" + "name_flat": "SteamAPI_SteamUser_v023" } ], "classname": "ISteamUser", @@ -4704,6 +4732,14 @@ ], "returntype": "HAuthTicket" }, + { + "methodname": "GetAuthTicketForWebApi", + "methodname_flat": "SteamAPI_ISteamUser_GetAuthTicketForWebApi", + "params": [ + { "paramname":"pchIdentity", "paramtype":"const char *" } + ], + "returntype": "HAuthTicket" + }, { "methodname": "BeginAuthSession", "methodname_flat": "SteamAPI_ISteamUser_BeginAuthSession", @@ -4846,7 +4882,7 @@ "returntype": "bool" } ], - "version_string": "SteamUser022" + "version_string": "SteamUser023" }, { "accessors": [ @@ -9036,7 +9072,7 @@ "returntype": "void" }, { - "callback": "SteamInputDeviceDisconnected_t", + "callback": "SteamInputGamepadSlotChange_t", "methodname": "EnableActionEventCallbacks", "methodname_flat": "SteamAPI_ISteamInput_EnableActionEventCallbacks", "params": [ diff --git a/public/steam/steam_api_flat.h b/public/steam/steam_api_flat.h index 90a71d2..ff3a2a1 100644 --- a/public/steam/steam_api_flat.h +++ b/public/steam/steam_api_flat.h @@ -58,9 +58,9 @@ S_API ISteamRemotePlay * SteamAPI_ISteamClient_GetISteamRemotePlay( ISteamClient // ISteamUser // A versioned accessor is exported by the library -S_API ISteamUser *SteamAPI_SteamUser_v022(); +S_API ISteamUser *SteamAPI_SteamUser_v023(); // Inline, unversioned accessor to get the current version. Essentially the same as SteamUser(), but using this ensures that you are using a matching library. -inline ISteamUser *SteamAPI_SteamUser() { return SteamAPI_SteamUser_v022(); } +inline ISteamUser *SteamAPI_SteamUser() { return SteamAPI_SteamUser_v023(); } S_API HSteamUser SteamAPI_ISteamUser_GetHSteamUser( ISteamUser* self ); S_API bool SteamAPI_ISteamUser_BLoggedOn( ISteamUser* self ); S_API uint64_steamid SteamAPI_ISteamUser_GetSteamID( ISteamUser* self ); @@ -75,6 +75,7 @@ S_API EVoiceResult SteamAPI_ISteamUser_GetVoice( ISteamUser* self, bool bWantCom S_API EVoiceResult SteamAPI_ISteamUser_DecompressVoice( ISteamUser* self, const void * pCompressed, uint32 cbCompressed, void * pDestBuffer, uint32 cbDestBufferSize, uint32 * nBytesWritten, uint32 nDesiredSampleRate ); S_API uint32 SteamAPI_ISteamUser_GetVoiceOptimalSampleRate( ISteamUser* self ); S_API HAuthTicket SteamAPI_ISteamUser_GetAuthSessionTicket( ISteamUser* self, void * pTicket, int cbMaxTicket, uint32 * pcbTicket, const SteamNetworkingIdentity * pSteamNetworkingIdentity ); +S_API HAuthTicket SteamAPI_ISteamUser_GetAuthTicketForWebApi( ISteamUser* self, const char * pchIdentity ); S_API EBeginAuthSessionResult SteamAPI_ISteamUser_BeginAuthSession( ISteamUser* self, const void * pAuthTicket, int cbAuthTicket, uint64_steamid steamID ); S_API void SteamAPI_ISteamUser_EndAuthSession( ISteamUser* self, uint64_steamid steamID ); S_API void SteamAPI_ISteamUser_CancelAuthTicket( ISteamUser* self, HAuthTicket hAuthTicket ); diff --git a/redistributable_bin/linux32/libsteam_api.so b/redistributable_bin/linux32/libsteam_api.so index e0f23af..687503b 100644 Binary files a/redistributable_bin/linux32/libsteam_api.so and b/redistributable_bin/linux32/libsteam_api.so differ diff --git a/redistributable_bin/linux64/libsteam_api.so b/redistributable_bin/linux64/libsteam_api.so index bbd3ff3..4217a2e 100644 Binary files a/redistributable_bin/linux64/libsteam_api.so and b/redistributable_bin/linux64/libsteam_api.so differ diff --git a/redistributable_bin/osx/libsteam_api.dylib b/redistributable_bin/osx/libsteam_api.dylib index 4d1cd97..5237be0 100644 Binary files a/redistributable_bin/osx/libsteam_api.dylib and b/redistributable_bin/osx/libsteam_api.dylib differ diff --git a/redistributable_bin/steam_api.dll b/redistributable_bin/steam_api.dll index 5b03e97..49f738b 100644 Binary files a/redistributable_bin/steam_api.dll and b/redistributable_bin/steam_api.dll differ diff --git a/redistributable_bin/steam_api.lib b/redistributable_bin/steam_api.lib index 12726a5..0cc7011 100644 Binary files a/redistributable_bin/steam_api.lib and b/redistributable_bin/steam_api.lib differ diff --git a/redistributable_bin/win64/steam_api64.dll b/redistributable_bin/win64/steam_api64.dll index 45a49e9..2b42812 100644 Binary files a/redistributable_bin/win64/steam_api64.dll and b/redistributable_bin/win64/steam_api64.dll differ diff --git a/redistributable_bin/win64/steam_api64.lib b/redistributable_bin/win64/steam_api64.lib index 663b11e..fb014ec 100644 Binary files a/redistributable_bin/win64/steam_api64.lib and b/redistributable_bin/win64/steam_api64.lib differ