Update to sdk 1.51

This commit is contained in:
Mr_Goldberg 2021-01-17 22:46:00 -05:00
parent 4cb55c52e2
commit 294c8e8124
No known key found for this signature in database
GPG key ID: 8597D87419DEF278
25 changed files with 1002 additions and 151 deletions

View file

@ -757,6 +757,11 @@ STEAMAPI_API bool SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser( IStea
return (get_steam_client()->steam_friends)->RegisterProtocolInOverlayBrowser(pchProtocol);
}
STEAMAPI_API void SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialogConnectString( ISteamFriends* self, const char * pchConnectString )
{
return (get_steam_client()->steam_friends)->ActivateGameOverlayInviteDialogConnectString(pchConnectString);
}
STEAMAPI_API ISteamUtils *SteamAPI_SteamUtils_v010()
{
return get_steam_client()->GetISteamUtils(flat_hsteampipe(), "SteamUtils010");
@ -2884,6 +2889,11 @@ STEAMAPI_API ISteamInput *SteamAPI_SteamInput_v001()
return get_steam_client()->GetISteamInput(flat_hsteamuser(), flat_hsteampipe(), "SteamInput001");
}
STEAMAPI_API ISteamInput *SteamAPI_SteamInput_v002()
{
return get_steam_client()->GetISteamInput(flat_hsteamuser(), flat_hsteampipe(), "SteamInput002");
}
STEAMAPI_API bool SteamAPI_ISteamInput_Init( ISteamInput* self )
{
return (get_steam_client()->steam_controller)->Init();
@ -3064,6 +3074,11 @@ STEAMAPI_API ISteamController *SteamAPI_SteamController_v007()
return get_steam_client()->GetISteamController(flat_hsteamuser(), flat_hsteampipe(), "SteamController007");
}
STEAMAPI_API ISteamController *SteamAPI_SteamController_v008()
{
return get_steam_client()->GetISteamController(flat_hsteamuser(), flat_hsteampipe(), "SteamController008");
}
STEAMAPI_API bool SteamAPI_ISteamController_Init( ISteamController* self )
{
return (get_steam_client()->steam_controller)->Init();
@ -3239,11 +3254,21 @@ STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v014()
return get_steam_client()->GetISteamUGC(flat_hsteamuser(), flat_hsteampipe(), "STEAMUGC_INTERFACE_VERSION014");
}
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v015()
{
return get_steam_client()->GetISteamUGC(flat_hsteamuser(), flat_hsteampipe(), "STEAMUGC_INTERFACE_VERSION015");
}
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v014()
{
return get_steam_client()->GetISteamUGC(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "STEAMUGC_INTERFACE_VERSION014");
}
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v015()
{
return get_steam_client()->GetISteamUGC(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "STEAMUGC_INTERFACE_VERSION015");
}
STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( ISteamUGC* self, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage )
{
int test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
@ -3340,6 +3365,42 @@ STEAMAPI_API bool SteamAPI_ISteamUGC_GetQueryUGCResult( ISteamUGC* self, UGCQuer
return (ptr)->GetQueryUGCResult(handle, index, pDetails);
}
STEAMAPI_API uint32 SteamAPI_ISteamUGC_GetQueryUGCNumTags( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index )
{
int test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
int test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_ugc);
auto ptr = get_steam_client()->steam_gameserver_ugc;
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
ptr = get_steam_client()->steam_ugc;
}
return (ptr)->GetQueryUGCNumTags(handle, index);
}
STEAMAPI_API bool SteamAPI_ISteamUGC_GetQueryUGCTag( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, uint32 indexTag, char * pchValue, uint32 cchValueSize )
{
int test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
int test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_ugc);
auto ptr = get_steam_client()->steam_gameserver_ugc;
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
ptr = get_steam_client()->steam_ugc;
}
return (ptr)->GetQueryUGCTag(handle, index, indexTag, pchValue, cchValueSize);
}
STEAMAPI_API bool SteamAPI_ISteamUGC_GetQueryUGCTagDisplayName( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, uint32 indexTag, char * pchValue, uint32 cchValueSize )
{
int test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
int test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_ugc);
auto ptr = get_steam_client()->steam_gameserver_ugc;
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
ptr = get_steam_client()->steam_ugc;
}
return (ptr)->GetQueryUGCTagDisplayName(handle, index, indexTag, pchValue, cchValueSize);
}
STEAMAPI_API bool SteamAPI_ISteamUGC_GetQueryUGCPreviewURL( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, char * pchURL, uint32 cchURLSize )
{
int test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
@ -5112,11 +5173,21 @@ STEAMAPI_API ISteamNetworkingMessages *SteamAPI_SteamNetworkingMessages_v002()
return (ISteamNetworkingMessages *)get_steam_client()->GetISteamGenericInterface(flat_hsteamuser(), flat_hsteampipe(), "SteamNetworkingMessages002");
}
STEAMAPI_API ISteamNetworkingMessages *SteamAPI_SteamNetworkingMessages_SteamAPI_v002()
{
return (ISteamNetworkingMessages *)get_steam_client()->GetISteamGenericInterface(flat_hsteamuser(), flat_hsteampipe(), "SteamNetworkingMessages002");
}
STEAMAPI_API ISteamNetworkingMessages *SteamAPI_SteamGameServerNetworkingMessages_v002()
{
return (ISteamNetworkingMessages *)get_steam_client()->GetISteamGenericInterface(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "SteamNetworkingMessages002");
}
STEAMAPI_API ISteamNetworkingMessages *SteamAPI_SteamGameServerNetworkingMessages_SteamAPI_v002()
{
return (ISteamNetworkingMessages *)get_steam_client()->GetISteamGenericInterface(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "SteamNetworkingMessages002");
}
STEAMAPI_API EResult SteamAPI_ISteamNetworkingMessages_SendMessageToUser( ISteamNetworkingMessages* self, const SteamNetworkingIdentity & identityRemote, const void * pubData, uint32 cubData, int nSendFlags, int nRemoteChannel )
{
return self->SendMessageToUser(identityRemote, pubData, cubData, nSendFlags, nRemoteChannel);
@ -5147,6 +5218,16 @@ STEAMAPI_API ESteamNetworkingConnectionState SteamAPI_ISteamNetworkingMessages_G
return self->GetSessionConnectionInfo(identityRemote, pConnectionInfo, pQuickStatus);
}
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v009()
{
return (ISteamNetworkingSockets *)get_steam_client()->GetISteamGenericInterface(flat_hsteamuser(), flat_hsteampipe(), "SteamNetworkingSockets009");
}
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009()
{
return (ISteamNetworkingSockets *)get_steam_client()->GetISteamGenericInterface(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "SteamNetworkingSockets009");
}
STEAMAPI_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_v009()
{
return (ISteamNetworkingSockets *)get_steam_client()->GetISteamGenericInterface(flat_hsteamuser(), flat_hsteampipe(), "SteamNetworkingSockets009");
@ -5387,6 +5468,11 @@ STEAMAPI_API void SteamAPI_ISteamNetworkingCustomSignalingRecvContext_SendReject
return self->SendRejectionSignal(identityPeer, pMsg, cbMsg);
}
STEAMAPI_API ISteamNetworkingUtils *SteamAPI_SteamNetworkingUtils_SteamAPI_v003()
{
return (ISteamNetworkingUtils *)get_steam_client()->GetISteamGenericInterface(flat_hsteamuser(), flat_hsteampipe(), "SteamNetworkingUtils003");
}
STEAMAPI_API ISteamNetworkingUtils *SteamAPI_SteamNetworkingUtils_v003()
{
return (ISteamNetworkingUtils *)get_steam_client()->GetISteamGenericInterface(flat_hsteamuser(), flat_hsteampipe(), "SteamNetworkingUtils003");
@ -6058,6 +6144,26 @@ STEAMAPI_API const char * SteamAPI_SteamNetworkingIdentity_GetXboxPairwiseID( St
return "";//self->GetXboxPairwiseID();
}
STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_SetPSNID( SteamNetworkingIdentity* self, uint64 id )
{
}
STEAMAPI_API uint64 SteamAPI_SteamNetworkingIdentity_GetPSNID( SteamNetworkingIdentity* self )
{
return 0;
}
STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_SetStadiaID( SteamNetworkingIdentity* self, uint64 id )
{
}
STEAMAPI_API uint64 SteamAPI_SteamNetworkingIdentity_GetStadiaID( SteamNetworkingIdentity* self )
{
return 0;
}
STEAMAPI_API void SteamAPI_SteamNetworkingIdentity_SetIPAddr( SteamNetworkingIdentity* self, const SteamNetworkingIPAddr & addr )
{
return self->SetIPAddr(addr);

View file

@ -849,6 +849,8 @@ ISteamController *Steam_Client::GetISteamController( HSteamUser hSteamUser, HSte
return (ISteamController *)(void *)(ISteamController005 *)steam_controller;
} else if (strcmp(pchVersion, "SteamController006") == 0) {
return (ISteamController *)(void *)(ISteamController006 *)steam_controller;
} else if (strcmp(pchVersion, "SteamController007") == 0) {
return (ISteamController *)(void *)(ISteamController007 *)steam_controller;
} else if (strcmp(pchVersion, STEAMCONTROLLER_INTERFACE_VERSION) == 0) {
return (ISteamController *)(void *)(ISteamController *)steam_controller;
} else {
@ -901,6 +903,8 @@ ISteamUGC *Steam_Client::GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamP
return (ISteamUGC *)(void *)(ISteamUGC012 *)steam_ugc_temp;
} else if (strcmp(pchVersion, "STEAMUGC_INTERFACE_VERSION013") == 0) {
return (ISteamUGC *)(void *)(ISteamUGC013 *)steam_ugc_temp;
} else if (strcmp(pchVersion, "STEAMUGC_INTERFACE_VERSION014") == 0) {
return (ISteamUGC *)(void *)(ISteamUGC014 *)steam_ugc_temp;
} else if (strcmp(pchVersion, STEAMUGC_INTERFACE_VERSION) == 0) {
return (ISteamUGC *)(void *)(ISteamUGC *)steam_ugc_temp;
} else {
@ -1057,6 +1061,14 @@ ISteamInput *Steam_Client::GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSt
PRINT_DEBUG("GetISteamInput %s\n", pchVersion);
if (!steam_pipes.count(hSteamPipe) || !hSteamUser) return NULL;
if (strcmp(pchVersion, "SteamInput001") == 0) {
return (ISteamInput *)(void *)(ISteamInput001 *)steam_controller;
} else if (strcmp(pchVersion, STEAMINPUT_INTERFACE_VERSION) == 0) {
return (ISteamInput *)(void *)(ISteamInput *)steam_controller;
} else {
return (ISteamInput *)(void *)(ISteamInput *)steam_controller;
}
return steam_controller;
}

View file

@ -72,7 +72,9 @@ public ISteamController003,
public ISteamController004,
public ISteamController005,
public ISteamController006,
public ISteamController007,
public ISteamController,
public ISteamInput001,
public ISteamInput
{
class Settings *settings;

View file

@ -1008,6 +1008,12 @@ bool RegisterProtocolInOverlayBrowser( const char *pchProtocol )
return false;
}
// Activates the game overlay to open an invite dialog that will send the provided Rich Presence connect string to selected friends
void ActivateGameOverlayInviteDialogConnectString( const char *pchConnectString )
{
PRINT_DEBUG("Steam_Friends::ActivateGameOverlayInviteDialogConnectString\n");
}
void RunCallbacks()
{
PRINT_DEBUG("Steam_Friends::RunCallbacks\n");

View file

@ -754,6 +754,7 @@ SteamNetworkingMessage_t *get_steam_message_connection(HSteamNetConnection hConn
pMsg->m_identityPeer = connect_socket->second.remote_identity;
pMsg->m_nConnUserData = connect_socket->second.user_data;
pMsg->m_usecTimeReceived = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - created).count();
//TODO: check where messagenumber starts
pMsg->m_nMessageNumber = connect_socket->second.packet_receive_counter;
++connect_socket->second.packet_receive_counter;

View file

@ -38,6 +38,7 @@ public ISteamUGC009,
public ISteamUGC010,
public ISteamUGC012,
public ISteamUGC013,
public ISteamUGC014,
public ISteamUGC
{
class Settings *settings;
@ -181,6 +182,23 @@ bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t
return true;
}
uint32 GetQueryUGCNumTags( UGCQueryHandle_t handle, uint32 index )
{
PRINT_DEBUG("Steam_UGC::GetQueryUGCNumTags\n");
return 0;
}
bool GetQueryUGCTag( UGCQueryHandle_t handle, uint32 index, uint32 indexTag, STEAM_OUT_STRING_COUNT( cchValueSize ) char* pchValue, uint32 cchValueSize )
{
PRINT_DEBUG("Steam_UGC::GetQueryUGCTag\n");
return false;
}
bool GetQueryUGCTagDisplayName( UGCQueryHandle_t handle, uint32 index, uint32 indexTag, STEAM_OUT_STRING_COUNT( cchValueSize ) char* pchValue, uint32 cchValueSize )
{
PRINT_DEBUG("Steam_UGC::GetQueryUGCTagDisplayName\n");
return false;
}
bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize )
{