update to steam sdk 1.55 (#675)

includes native apple M1 support
This commit is contained in:
Michal Cichra 2022-10-12 07:33:34 +02:00 committed by GitHub
parent 5cb1496e80
commit 0fda7e39fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 615 additions and 62 deletions

View File

@ -52,6 +52,8 @@ public enum CallbackType
SetPersonaNameResponse = 347, SetPersonaNameResponse = 347,
UnreadChatMessagesChanged = 348, UnreadChatMessagesChanged = 348,
OverlayBrowserProtocolNavigation = 349, OverlayBrowserProtocolNavigation = 349,
EquippedProfileItemsChanged = 350,
EquippedProfileItems = 351,
FavoritesListChanged = 502, FavoritesListChanged = 502,
LobbyInvite = 503, LobbyInvite = 503,
LobbyEnter = 504, LobbyEnter = 504,
@ -269,6 +271,8 @@ internal static partial class CallbackTypeFactory
{ CallbackType.SetPersonaNameResponse, typeof( SetPersonaNameResponse_t )}, { CallbackType.SetPersonaNameResponse, typeof( SetPersonaNameResponse_t )},
{ CallbackType.UnreadChatMessagesChanged, typeof( UnreadChatMessagesChanged_t )}, { CallbackType.UnreadChatMessagesChanged, typeof( UnreadChatMessagesChanged_t )},
{ CallbackType.OverlayBrowserProtocolNavigation, typeof( OverlayBrowserProtocolNavigation_t )}, { CallbackType.OverlayBrowserProtocolNavigation, typeof( OverlayBrowserProtocolNavigation_t )},
{ CallbackType.EquippedProfileItemsChanged, typeof( EquippedProfileItemsChanged_t )},
{ CallbackType.EquippedProfileItems, typeof( EquippedProfileItems_t )},
{ CallbackType.FavoritesListChanged, typeof( FavoritesListChanged_t )}, { CallbackType.FavoritesListChanged, typeof( FavoritesListChanged_t )},
{ CallbackType.LobbyInvite, typeof( LobbyInvite_t )}, { CallbackType.LobbyInvite, typeof( LobbyInvite_t )},
{ CallbackType.LobbyEnter, typeof( LobbyEnter_t )}, { CallbackType.LobbyEnter, typeof( LobbyEnter_t )},

View File

@ -357,5 +357,17 @@ internal bool BIsTimedTrial( ref uint punSecondsAllowed, ref uint punSecondsPlay
return returnValue; return returnValue;
} }
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_SetDlcContext", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetDlcContext( IntPtr self, AppId nAppID );
#endregion
internal bool SetDlcContext( AppId nAppID )
{
var returnValue = _SetDlcContext( Self, nAppID );
return returnValue;
}
} }
} }

View File

@ -862,5 +862,50 @@ internal void ActivateGameOverlayInviteDialogConnectString( [MarshalAs( Unmanage
_ActivateGameOverlayInviteDialogConnectString( Self, pchConnectString ); _ActivateGameOverlayInviteDialogConnectString( Self, pchConnectString );
} }
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestEquippedProfileItems", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _RequestEquippedProfileItems( IntPtr self, SteamId steamID );
#endregion
internal CallResult<EquippedProfileItems_t> RequestEquippedProfileItems( SteamId steamID )
{
var returnValue = _RequestEquippedProfileItems( Self, steamID );
return new CallResult<EquippedProfileItems_t>( returnValue, IsServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_BHasEquippedProfileItem", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _BHasEquippedProfileItem( IntPtr self, SteamId steamID, CommunityProfileItemType itemType );
#endregion
internal bool BHasEquippedProfileItem( SteamId steamID, CommunityProfileItemType itemType )
{
var returnValue = _BHasEquippedProfileItem( Self, steamID, itemType );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetProfileItemPropertyString", CallingConvention = Platform.CC)]
private static extern Utf8StringPointer _GetProfileItemPropertyString( IntPtr self, SteamId steamID, CommunityProfileItemType itemType, CommunityProfileItemProperty prop );
#endregion
internal string GetProfileItemPropertyString( SteamId steamID, CommunityProfileItemType itemType, CommunityProfileItemProperty prop )
{
var returnValue = _GetProfileItemPropertyString( Self, steamID, itemType, prop );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetProfileItemPropertyUint", CallingConvention = Platform.CC)]
private static extern uint _GetProfileItemPropertyUint( IntPtr self, SteamId steamID, CommunityProfileItemType itemType, CommunityProfileItemProperty prop );
#endregion
internal uint GetProfileItemPropertyUint( SteamId steamID, CommunityProfileItemType itemType, CommunityProfileItemProperty prop )
{
var returnValue = _GetProfileItemPropertyUint( Self, steamID, itemType, prop );
return returnValue;
}
} }
} }

View File

@ -487,6 +487,41 @@ internal struct OverlayBrowserProtocolNavigation_t : ICallbackData
#endregion #endregion
} }
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal struct EquippedProfileItemsChanged_t : ICallbackData
{
internal ulong SteamID; // m_steamID CSteamID
#region SteamCallback
public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(EquippedProfileItemsChanged_t) );
public int DataSize => _datasize;
public CallbackType CallbackType => CallbackType.EquippedProfileItemsChanged;
#endregion
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
internal struct EquippedProfileItems_t : ICallbackData
{
internal Result Result; // m_eResult EResult
internal ulong SteamID; // m_steamID CSteamID
[MarshalAs(UnmanagedType.I1)]
internal bool HasAnimatedAvatar; // m_bHasAnimatedAvatar bool
[MarshalAs(UnmanagedType.I1)]
internal bool HasAvatarFrame; // m_bHasAvatarFrame bool
[MarshalAs(UnmanagedType.I1)]
internal bool HasProfileModifier; // m_bHasProfileModifier bool
[MarshalAs(UnmanagedType.I1)]
internal bool HasProfileBackground; // m_bHasProfileBackground bool
[MarshalAs(UnmanagedType.I1)]
internal bool HasMiniProfileBackground; // m_bHasMiniProfileBackground bool
#region SteamCallback
public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(EquippedProfileItems_t) );
public int DataSize => _datasize;
public CallbackType CallbackType => CallbackType.EquippedProfileItems;
#endregion
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal struct IPCountry_t : ICallbackData internal struct IPCountry_t : ICallbackData
{ {

View File

@ -156,6 +156,10 @@ public enum Result : int
InvalidSignature = 121, InvalidSignature = 121,
ParseFailure = 122, ParseFailure = 122,
NoVerifiedPhone = 123, NoVerifiedPhone = 123,
InsufficientBattery = 124,
ChargerRequired = 125,
CachedCredentialInvalid = 126,
K_EResultPhoneNumberIsVOIP = 127,
} }
// //
@ -544,6 +548,37 @@ internal enum ActivateGameOverlayToWebPageMode : int
Modal = 1, Modal = 1,
} }
//
// ECommunityProfileItemType
//
internal enum CommunityProfileItemType : int
{
AnimatedAvatar = 0,
AvatarFrame = 1,
ProfileModifier = 2,
ProfileBackground = 3,
MiniProfileBackground = 4,
}
//
// ECommunityProfileItemProperty
//
internal enum CommunityProfileItemProperty : int
{
ImageSmall = 0,
ImageLarge = 1,
InternalName = 2,
Title = 3,
Description = 4,
AppID = 5,
TypeID = 6,
Class = 7,
MovieWebM = 8,
MovieMP4 = 9,
MovieWebMSmall = 10,
MovieMP4Small = 11,
}
// //
// EPersonaChange // EPersonaChange
// //
@ -2324,6 +2359,10 @@ internal enum NetConfig : int
P2P_Transport_ICE_Enable = 104, P2P_Transport_ICE_Enable = 104,
P2P_Transport_ICE_Penalty = 105, P2P_Transport_ICE_Penalty = 105,
P2P_Transport_SDR_Penalty = 106, P2P_Transport_SDR_Penalty = 106,
P2P_TURN_ServerList = 107,
P2P_TURN_UserList = 108,
P2P_TURN_PassList = 109,
P2P_Transport_ICE_Implementation = 110,
SDRClient_ConsecutitivePingTimeoutsFailInitial = 19, SDRClient_ConsecutitivePingTimeoutsFailInitial = 19,
SDRClient_ConsecutitivePingTimeoutsFail = 20, SDRClient_ConsecutitivePingTimeoutsFail = 20,
SDRClient_MinPingsBeforePingAccurate = 21, SDRClient_MinPingsBeforePingAccurate = 21,

View File

@ -168,6 +168,7 @@ internal static bool IsDeprecated( string name )
if ( name.StartsWith( "ISteamInput." ) ) if ( name.StartsWith( "ISteamInput." ) )
{ {
if ( name.Contains( "EnableActionEventCallbacks" ) ) return true; if ( name.Contains( "EnableActionEventCallbacks" ) ) return true;
if ( name.Contains( "DualSense" ) ) return true;
} }
if ( name.StartsWith( "ISteamRemoteStorage." ) ) if ( name.StartsWith( "ISteamRemoteStorage." ) )

View File

@ -92,6 +92,9 @@ private void WriteEnum( SteamApiDefinition.EnumDef o, string name, string t = "i
ename = p + ename; ename = p + ename;
} }
if (ename.StartsWith( $"k_E{name}" ))
ename = ename[(name.Length + 3)..];
WriteLine( $"{ename.Trim( ' ', '_' )} = {entry.Value}," ); WriteLine( $"{ename.Trim( ' ', '_' )} = {entry.Value}," );
} }
} }

View File

@ -108,6 +108,9 @@ public:
// check if game is a timed trial with limited playtime // check if game is a timed trial with limited playtime
virtual bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) = 0; virtual bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) = 0;
// set current DLC AppID being played (or 0 if none). Allows Steam to track usage of major DLC extensions
virtual bool SetDlcContext( AppId_t nAppID ) = 0;
}; };
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008" #define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008"

View File

@ -0,0 +1,169 @@
/* SIE CONFIDENTIAL
* $PSLibId$
* Copyright (C) 2019 Sony Interactive Entertainment Inc.
* All Rights Reserved.
*/
#ifndef _SCE_PAD_TRIGGER_EFFECT_H
#define _SCE_PAD_TRIGGER_EFFECT_H
#define SCE_PAD_TRIGGER_EFFECT_TRIGGER_MASK_L2 0x01
#define SCE_PAD_TRIGGER_EFFECT_TRIGGER_MASK_R2 0x02
#define SCE_PAD_TRIGGER_EFFECT_PARAM_INDEX_FOR_L2 0
#define SCE_PAD_TRIGGER_EFFECT_PARAM_INDEX_FOR_R2 1
#define SCE_PAD_TRIGGER_EFFECT_TRIGGER_NUM 2
/* Definition of control point num */
#define SCE_PAD_TRIGGER_EFFECT_CONTROL_POINT_NUM 10
typedef enum ScePadTriggerEffectMode{
SCE_PAD_TRIGGER_EFFECT_MODE_OFF,
SCE_PAD_TRIGGER_EFFECT_MODE_FEEDBACK,
SCE_PAD_TRIGGER_EFFECT_MODE_WEAPON,
SCE_PAD_TRIGGER_EFFECT_MODE_VIBRATION,
SCE_PAD_TRIGGER_EFFECT_MODE_MULTIPLE_POSITION_FEEDBACK,
SCE_PAD_TRIGGER_EFFECT_MODE_SLOPE_FEEDBACK,
SCE_PAD_TRIGGER_EFFECT_MODE_MULTIPLE_POSITION_VIBRATION,
} ScePadTriggerEffectMode;
/**
*E
* @brief parameter for setting the trigger effect to off mode.
* Off Mode: Stop trigger effect.
**/
typedef struct ScePadTriggerEffectOffParam{
uint8_t padding[48];
} ScePadTriggerEffectOffParam;
/**
*E
* @brief parameter for setting the trigger effect to Feedback mode.
* Feedback Mode: The motor arm pushes back trigger.
* Trigger obtains stiffness at specified position.
**/
typedef struct ScePadTriggerEffectFeedbackParam{
uint8_t position; /*E position where the strength of target trigger start changing(0~9). */
uint8_t strength; /*E strength that the motor arm pushes back target trigger(0~8 (0: Same as Off mode)). */
uint8_t padding[46];
} ScePadTriggerEffectFeedbackParam;
/**
*E
* @brief parameter for setting the trigger effect to Weapon mode.
* Weapon Mode: Emulate weapon like gun trigger.
**/
typedef struct ScePadTriggerEffectWeaponParam{
uint8_t startPosition; /*E position where the stiffness of trigger start changing(2~7). */
uint8_t endPosition; /*E position where the stiffness of trigger finish changing(startPosition+1~8). */
uint8_t strength; /*E strength of gun trigger(0~8 (0: Same as Off mode)). */
uint8_t padding[45];
} ScePadTriggerEffectWeaponParam;
/**
*E
* @brief parameter for setting the trigger effect to Vibration mode.
* Vibration Mode: Vibrates motor arm around specified position.
**/
typedef struct ScePadTriggerEffectVibrationParam{
uint8_t position; /*E position where the motor arm start vibrating(0~9). */
uint8_t amplitude; /*E vibration amplitude(0~8 (0: Same as Off mode)). */
uint8_t frequency; /*E vibration frequency(0~255[Hz] (0: Same as Off mode)). */
uint8_t padding[45];
} ScePadTriggerEffectVibrationParam;
/**
*E
* @brief parameter for setting the trigger effect to ScePadTriggerEffectMultiplePositionFeedbackParam mode.
* Multi Position Feedback Mode: The motor arm pushes back trigger.
* Trigger obtains specified stiffness at each control point.
**/
typedef struct ScePadTriggerEffectMultiplePositionFeedbackParam{
uint8_t strength[SCE_PAD_TRIGGER_EFFECT_CONTROL_POINT_NUM]; /*E strength that the motor arm pushes back target trigger at position(0~8 (0: Same as Off mode)).
* strength[0] means strength of motor arm at position0.
* strength[1] means strength of motor arm at position1.
* ...
* */
uint8_t padding[38];
} ScePadTriggerEffectMultiplePositionFeedbackParam;
/**
*E
* @brief parameter for setting the trigger effect to Feedback3 mode.
* Slope Feedback Mode: The motor arm pushes back trigger between two spedified control points.
* Stiffness of the trigger is changing depending on the set place.
**/
typedef struct ScePadTriggerEffectSlopeFeedbackParam{
uint8_t startPosition; /*E position where the strength of target trigger start changing(0~endPosition). */
uint8_t endPosition; /*E position where the strength of target trigger finish changing(startPosition+1~9). */
uint8_t startStrength; /*E strength when trigger's position is startPosition(1~8) */
uint8_t endStrength; /*E strength when trigger's position is endPosition(1~8) */
uint8_t padding[44];
} ScePadTriggerEffectSlopeFeedbackParam;
/**
*E
* @brief parameter for setting the trigger effect to Vibration2 mode.
* Multi Position Vibration Mode: Vibrates motor arm around specified control point.
* Trigger vibrates specified amplitude at each control point.
**/
typedef struct ScePadTriggerEffectMultiplePositionVibrationParam{
uint8_t frequency; /*E vibration frequency(0~255 (0: Same as Off mode)) */
uint8_t amplitude[SCE_PAD_TRIGGER_EFFECT_CONTROL_POINT_NUM]; /*E vibration amplitude at position(0~8 (0: Same as Off mode)).
* amplitude[0] means amplitude of vibration at position0.
* amplitude[1] means amplitude of vibration at position1.
* ...
* */
uint8_t padding[37];
} ScePadTriggerEffectMultiplePositionVibrationParam;
/**
*E
* @brief parameter for setting the trigger effect mode.
**/
typedef union ScePadTriggerEffectCommandData{
ScePadTriggerEffectOffParam offParam;
ScePadTriggerEffectFeedbackParam feedbackParam;
ScePadTriggerEffectWeaponParam weaponParam;
ScePadTriggerEffectVibrationParam vibrationParam;
ScePadTriggerEffectMultiplePositionFeedbackParam multiplePositionFeedbackParam;
ScePadTriggerEffectSlopeFeedbackParam slopeFeedbackParam;
ScePadTriggerEffectMultiplePositionVibrationParam multiplePositionVibrationParam;
} ScePadTriggerEffectCommandData;
/**
*E
* @brief parameter for setting the trigger effect.
**/
typedef struct ScePadTriggerEffectCommand{
ScePadTriggerEffectMode mode;
uint8_t padding[4];
ScePadTriggerEffectCommandData commandData;
} ScePadTriggerEffectCommand;
/**
*E
* @brief parameter for the scePadSetTriggerEffect function.
**/
typedef struct ScePadTriggerEffectParam{
uint8_t triggerMask; /*E Set trigger mask to activate trigger effect commands.
* SCE_PAD_TRIGGER_EFFECT_TRIGGER_MASK_L2 : 0x01
* SCE_PAD_TRIGGER_EFFECT_TRIGGER_MASK_R2 : 0x02
* */
uint8_t padding[7];
ScePadTriggerEffectCommand command[SCE_PAD_TRIGGER_EFFECT_TRIGGER_NUM]; /*E command[SCE_PAD_TRIGGER_EFFECT_PARAM_INDEX_FOR_L2] is for L2 trigger setting
* and param[SCE_PAD_TRIGGER_EFFECT_PARAM_INDEX_FOR_R2] is for R2 trgger setting.
* */
} ScePadTriggerEffectParam;
#if defined(__cplusplus) && __cplusplus >= 201103L
static_assert( sizeof( ScePadTriggerEffectParam ) == 120, "ScePadTriggerEffectParam has incorrect size" );
#endif
#endif /* _SCE_PAD_TRIGGER_EFFECT_H */

View File

@ -157,6 +157,32 @@ enum EActivateGameOverlayToWebPageMode
// will also close. When the user closes the browser window, the overlay will automatically close. // will also close. When the user closes the browser window, the overlay will automatically close.
}; };
//-----------------------------------------------------------------------------
// Purpose: See GetProfileItemPropertyString and GetProfileItemPropertyUint
//-----------------------------------------------------------------------------
enum ECommunityProfileItemType
{
k_ECommunityProfileItemType_AnimatedAvatar = 0,
k_ECommunityProfileItemType_AvatarFrame = 1,
k_ECommunityProfileItemType_ProfileModifier = 2,
k_ECommunityProfileItemType_ProfileBackground = 3,
k_ECommunityProfileItemType_MiniProfileBackground = 4,
};
enum ECommunityProfileItemProperty
{
k_ECommunityProfileItemProperty_ImageSmall = 0, // string
k_ECommunityProfileItemProperty_ImageLarge = 1, // string
k_ECommunityProfileItemProperty_InternalName = 2, // string
k_ECommunityProfileItemProperty_Title = 3, // string
k_ECommunityProfileItemProperty_Description = 4, // string
k_ECommunityProfileItemProperty_AppID = 5, // uint32
k_ECommunityProfileItemProperty_TypeID = 6, // uint32
k_ECommunityProfileItemProperty_Class = 7, // uint32
k_ECommunityProfileItemProperty_MovieWebM = 8, // string
k_ECommunityProfileItemProperty_MovieMP4 = 9, // string
k_ECommunityProfileItemProperty_MovieWebMSmall = 10, // string
k_ECommunityProfileItemProperty_MovieMP4Small = 11, // string
};
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: interface to accessing information about individual users, // Purpose: interface to accessing information about individual users,
@ -422,6 +448,14 @@ public:
// Activates the game overlay to open an invite dialog that will send the provided Rich Presence connect string to selected friends // Activates the game overlay to open an invite dialog that will send the provided Rich Presence connect string to selected friends
virtual void ActivateGameOverlayInviteDialogConnectString( const char *pchConnectString ) = 0; virtual void ActivateGameOverlayInviteDialogConnectString( const char *pchConnectString ) = 0;
// Steam Community items equipped by a user on their profile
// You can register for EquippedProfileItemsChanged_t to know when a friend has changed their equipped profile items
STEAM_CALL_RESULT( EquippedProfileItems_t )
virtual SteamAPICall_t RequestEquippedProfileItems( CSteamID steamID ) = 0;
virtual bool BHasEquippedProfileItem( CSteamID steamID, ECommunityProfileItemType itemType ) = 0;
virtual const char *GetProfileItemPropertyString( CSteamID steamID, ECommunityProfileItemType itemType, ECommunityProfileItemProperty prop ) = 0;
virtual uint32 GetProfileItemPropertyUint( CSteamID steamID, ECommunityProfileItemType itemType, ECommunityProfileItemProperty prop ) = 0;
}; };
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017" #define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017"
@ -687,6 +721,29 @@ struct OverlayBrowserProtocolNavigation_t
char rgchURI[ 1024 ]; char rgchURI[ 1024 ];
}; };
//-----------------------------------------------------------------------------
// Purpose: A user's equipped profile items have changed
//-----------------------------------------------------------------------------
struct EquippedProfileItemsChanged_t
{
enum { k_iCallback = k_iSteamFriendsCallbacks + 50 };
CSteamID m_steamID;
};
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
struct EquippedProfileItems_t
{
enum { k_iCallback = k_iSteamFriendsCallbacks + 51 };
EResult m_eResult;
CSteamID m_steamID;
bool m_bHasAnimatedAvatar;
bool m_bHasAvatarFrame;
bool m_bHasProfileModifier;
bool m_bHasProfileBackground;
bool m_bHasMiniProfileBackground;
};
#pragma pack( pop ) #pragma pack( pop )

View File

@ -682,6 +682,11 @@ struct SteamInputActionEvent_t
}; };
}; };
//-----------------------------------------------------------------------------
// Forward declaration for ScePadTriggerEffectParam, defined in isteamdualsense.h
//-----------------------------------------------------------------------------
struct ScePadTriggerEffectParam;
#pragma pack( pop ) #pragma pack( pop )
typedef void ( *SteamInputActionEventCallbackPointer )( SteamInputActionEvent_t * ); typedef void ( *SteamInputActionEventCallbackPointer )( SteamInputActionEvent_t * );
@ -895,6 +900,9 @@ public:
// Get a bitmask of the Steam Input Configuration types opted in for the current session. Returns ESteamInputConfigurationEnableType values.? // Get a bitmask of the Steam Input Configuration types opted in for the current session. Returns ESteamInputConfigurationEnableType values.?
// Note: user can override the settings from the Steamworks Partner site so the returned values may not exactly match your default configuration // Note: user can override the settings from the Steamworks Partner site so the returned values may not exactly match your default configuration
virtual uint16 GetSessionInputConfigurationSettings() = 0; virtual uint16 GetSessionInputConfigurationSettings() = 0;
// Set the trigger effect for a DualSense controller
virtual void SetDualSenseTriggerEffect( InputHandle_t inputHandle, const ScePadTriggerEffectParam *pParam ) = 0;
}; };
#define STEAMINPUT_INTERFACE_VERSION "SteamInput006" #define STEAMINPUT_INTERFACE_VERSION "SteamInput006"

View File

@ -163,26 +163,23 @@ struct SteamNetworkingMessagesSessionFailed_t
#pragma pack(pop) #pragma pack(pop)
// Global accessors // Global accessors
// Using standalone lib // Using standalone lib
#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB #ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB
// Standalone lib.
static_assert( STEAMNETWORKINGMESSAGES_INTERFACE_VERSION[25] == '2', "Version mismatch" ); static_assert( STEAMNETWORKINGMESSAGES_INTERFACE_VERSION[25] == '2', "Version mismatch" );
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamNetworkingMessages_LibV2(); STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamNetworkingMessages_LibV2();
inline ISteamNetworkingMessages *SteamNetworkingMessages_Lib() { return SteamNetworkingMessages_LibV2(); } inline ISteamNetworkingMessages *SteamNetworkingMessages_Lib() { return SteamNetworkingMessages_LibV2(); }
// If running in context of steam, we also define a gameserver instance. // If running in context of steam, we also define a gameserver instance.
#ifdef STEAMNETWORKINGSOCKETS_STEAM
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamGameServerNetworkingMessages_LibV2(); STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamGameServerNetworkingMessages_LibV2();
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages_Lib() { return SteamGameServerNetworkingMessages_LibV2(); } inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages_Lib() { return SteamGameServerNetworkingMessages_LibV2(); }
#endif
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI #ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_LibV2(); } inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_LibV2(); }
#ifdef STEAMNETWORKINGSOCKETS_STEAM
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_LibV2(); } inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_LibV2(); }
#endif #endif
#endif
#endif #endif
// Using Steamworks SDK // Using Steamworks SDK

View File

@ -920,32 +920,25 @@ protected:
#define STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "SteamNetworkingSockets012" #define STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "SteamNetworkingSockets012"
// Global accessors // Global accessors
// Using standalone lib // Using standalone lib
#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB #ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB
// Standalone lib.
static_assert( STEAMNETWORKINGSOCKETS_INTERFACE_VERSION[24] == '2', "Version mismatch" ); static_assert( STEAMNETWORKINGSOCKETS_INTERFACE_VERSION[24] == '2', "Version mismatch" );
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets_LibV12(); STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets_LibV12();
inline ISteamNetworkingSockets *SteamNetworkingSockets_Lib() { return SteamNetworkingSockets_LibV12(); } inline ISteamNetworkingSockets *SteamNetworkingSockets_Lib() { return SteamNetworkingSockets_LibV12(); }
// If running in context of steam, we also define a gameserver instance.
#ifdef STEAMNETWORKINGSOCKETS_STEAM
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamGameServerNetworkingSockets_LibV12(); STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamGameServerNetworkingSockets_LibV12();
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets_Lib() { return SteamGameServerNetworkingSockets_LibV12(); } inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets_Lib() { return SteamGameServerNetworkingSockets_LibV12(); }
#endif
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI #ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_LibV12(); } inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_LibV12(); }
#ifdef STEAMNETWORKINGSOCKETS_STEAM
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_LibV12(); } inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_LibV12(); }
#endif #endif
#endif
#endif #endif
// Using Steamworks SDK // Using Steamworks SDK
#ifdef STEAMNETWORKINGSOCKETS_STEAMAPI #ifdef STEAMNETWORKINGSOCKETS_STEAMAPI
// Steamworks SDK
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION ); STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION );
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamGameServerNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION ); STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamGameServerNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION );

View File

@ -45,8 +45,8 @@ enum EFloatingGamepadTextInputMode
{ {
k_EFloatingGamepadTextInputModeModeSingleLine = 0, // Enter dismisses the keyboard k_EFloatingGamepadTextInputModeModeSingleLine = 0, // Enter dismisses the keyboard
k_EFloatingGamepadTextInputModeModeMultipleLines = 1, // User needs to explictly close the keyboard k_EFloatingGamepadTextInputModeModeMultipleLines = 1, // User needs to explictly close the keyboard
k_EFloatingGamepadTextInputModeModeEmail = 2, k_EFloatingGamepadTextInputModeModeEmail = 2, // Keyboard layout is email, enter dismisses the keyboard
k_EFloatingGamepadTextInputModeModeNumeric = 3, k_EFloatingGamepadTextInputModeModeNumeric = 3, // Keyboard layout is numeric, enter dismisses the keyboard
}; };

View File

@ -290,6 +290,26 @@
], ],
"struct": "OverlayBrowserProtocolNavigation_t" "struct": "OverlayBrowserProtocolNavigation_t"
}, },
{
"callback_id": 350,
"fields": [
{ "fieldname":"m_steamID", "fieldtype":"CSteamID" }
],
"struct": "EquippedProfileItemsChanged_t"
},
{
"callback_id": 351,
"fields": [
{ "fieldname":"m_eResult", "fieldtype":"EResult" },
{ "fieldname":"m_steamID", "fieldtype":"CSteamID" },
{ "fieldname":"m_bHasAnimatedAvatar", "fieldtype":"bool" },
{ "fieldname":"m_bHasAvatarFrame", "fieldtype":"bool" },
{ "fieldname":"m_bHasProfileModifier", "fieldtype":"bool" },
{ "fieldname":"m_bHasProfileBackground", "fieldtype":"bool" },
{ "fieldname":"m_bHasMiniProfileBackground", "fieldtype":"bool" }
],
"struct": "EquippedProfileItems_t"
},
{ {
"callback_id": 701, "callback_id": 701,
"fields": [], "fields": [],
@ -2076,7 +2096,11 @@
{ "name":"k_EResultSteamRealmMismatch", "value":"120" }, { "name":"k_EResultSteamRealmMismatch", "value":"120" },
{ "name":"k_EResultInvalidSignature", "value":"121" }, { "name":"k_EResultInvalidSignature", "value":"121" },
{ "name":"k_EResultParseFailure", "value":"122" }, { "name":"k_EResultParseFailure", "value":"122" },
{ "name":"k_EResultNoVerifiedPhone", "value":"123" } { "name":"k_EResultNoVerifiedPhone", "value":"123" },
{ "name":"k_EResultInsufficientBattery", "value":"124" },
{ "name":"k_EResultChargerRequired", "value":"125" },
{ "name":"k_EResultCachedCredentialInvalid", "value":"126" },
{ "name":"K_EResultPhoneNumberIsVOIP", "value":"127" }
] ]
}, },
{ {
@ -2415,6 +2439,33 @@
{ "name":"k_EActivateGameOverlayToWebPageMode_Modal", "value":"1" } { "name":"k_EActivateGameOverlayToWebPageMode_Modal", "value":"1" }
] ]
}, },
{
"enumname": "ECommunityProfileItemType",
"values": [
{ "name":"k_ECommunityProfileItemType_AnimatedAvatar", "value":"0" },
{ "name":"k_ECommunityProfileItemType_AvatarFrame", "value":"1" },
{ "name":"k_ECommunityProfileItemType_ProfileModifier", "value":"2" },
{ "name":"k_ECommunityProfileItemType_ProfileBackground", "value":"3" },
{ "name":"k_ECommunityProfileItemType_MiniProfileBackground", "value":"4" }
]
},
{
"enumname": "ECommunityProfileItemProperty",
"values": [
{ "name":"k_ECommunityProfileItemProperty_ImageSmall", "value":"0" },
{ "name":"k_ECommunityProfileItemProperty_ImageLarge", "value":"1" },
{ "name":"k_ECommunityProfileItemProperty_InternalName", "value":"2" },
{ "name":"k_ECommunityProfileItemProperty_Title", "value":"3" },
{ "name":"k_ECommunityProfileItemProperty_Description", "value":"4" },
{ "name":"k_ECommunityProfileItemProperty_AppID", "value":"5" },
{ "name":"k_ECommunityProfileItemProperty_TypeID", "value":"6" },
{ "name":"k_ECommunityProfileItemProperty_Class", "value":"7" },
{ "name":"k_ECommunityProfileItemProperty_MovieWebM", "value":"8" },
{ "name":"k_ECommunityProfileItemProperty_MovieMP4", "value":"9" },
{ "name":"k_ECommunityProfileItemProperty_MovieWebMSmall", "value":"10" },
{ "name":"k_ECommunityProfileItemProperty_MovieMP4Small", "value":"11" }
]
},
{ {
"enumname": "EPersonaChange", "enumname": "EPersonaChange",
"values": [ "values": [
@ -4097,6 +4148,10 @@
{ "name":"k_ESteamNetworkingConfig_P2P_Transport_ICE_Enable", "value":"104" }, { "name":"k_ESteamNetworkingConfig_P2P_Transport_ICE_Enable", "value":"104" },
{ "name":"k_ESteamNetworkingConfig_P2P_Transport_ICE_Penalty", "value":"105" }, { "name":"k_ESteamNetworkingConfig_P2P_Transport_ICE_Penalty", "value":"105" },
{ "name":"k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty", "value":"106" }, { "name":"k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty", "value":"106" },
{ "name":"k_ESteamNetworkingConfig_P2P_TURN_ServerList", "value":"107" },
{ "name":"k_ESteamNetworkingConfig_P2P_TURN_UserList", "value":"108" },
{ "name":"k_ESteamNetworkingConfig_P2P_TURN_PassList", "value":"109" },
{ "name":"k_ESteamNetworkingConfig_P2P_Transport_ICE_Implementation", "value":"110" },
{ "name":"k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFailInitial", "value":"19" }, { "name":"k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFailInitial", "value":"19" },
{ "name":"k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFail", "value":"20" }, { "name":"k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFail", "value":"20" },
{ "name":"k_ESteamNetworkingConfig_SDRClient_MinPingsBeforePingAccurate", "value":"21" }, { "name":"k_ESteamNetworkingConfig_SDRClient_MinPingsBeforePingAccurate", "value":"21" },
@ -5445,6 +5500,44 @@
{ "paramname":"pchConnectString", "paramtype":"const char *" } { "paramname":"pchConnectString", "paramtype":"const char *" }
], ],
"returntype": "void" "returntype": "void"
},
{
"callresult": "EquippedProfileItems_t",
"methodname": "RequestEquippedProfileItems",
"methodname_flat": "SteamAPI_ISteamFriends_RequestEquippedProfileItems",
"params": [
{ "paramname":"steamID", "paramtype":"CSteamID", "paramtype_flat":"uint64_steamid" }
],
"returntype": "SteamAPICall_t"
},
{
"methodname": "BHasEquippedProfileItem",
"methodname_flat": "SteamAPI_ISteamFriends_BHasEquippedProfileItem",
"params": [
{ "paramname":"steamID", "paramtype":"CSteamID", "paramtype_flat":"uint64_steamid" },
{ "paramname":"itemType", "paramtype":"ECommunityProfileItemType" }
],
"returntype": "bool"
},
{
"methodname": "GetProfileItemPropertyString",
"methodname_flat": "SteamAPI_ISteamFriends_GetProfileItemPropertyString",
"params": [
{ "paramname":"steamID", "paramtype":"CSteamID", "paramtype_flat":"uint64_steamid" },
{ "paramname":"itemType", "paramtype":"ECommunityProfileItemType" },
{ "paramname":"prop", "paramtype":"ECommunityProfileItemProperty" }
],
"returntype": "const char *"
},
{
"methodname": "GetProfileItemPropertyUint",
"methodname_flat": "SteamAPI_ISteamFriends_GetProfileItemPropertyUint",
"params": [
{ "paramname":"steamID", "paramtype":"CSteamID", "paramtype_flat":"uint64_steamid" },
{ "paramname":"itemType", "paramtype":"ECommunityProfileItemType" },
{ "paramname":"prop", "paramtype":"ECommunityProfileItemProperty" }
],
"returntype": "uint32"
} }
], ],
"version_string": "SteamFriends017" "version_string": "SteamFriends017"
@ -7934,6 +8027,14 @@
{ "paramname":"punSecondsPlayed", "paramtype":"uint32 *" } { "paramname":"punSecondsPlayed", "paramtype":"uint32 *" }
], ],
"returntype": "bool" "returntype": "bool"
},
{
"methodname": "SetDlcContext",
"methodname_flat": "SteamAPI_ISteamApps_SetDlcContext",
"params": [
{ "paramname":"nAppID", "paramtype":"AppId_t" }
],
"returntype": "bool"
} }
], ],
"version_string": "STEAMAPPS_INTERFACE_VERSION008" "version_string": "STEAMAPPS_INTERFACE_VERSION008"
@ -9286,6 +9387,15 @@
"methodname_flat": "SteamAPI_ISteamInput_GetSessionInputConfigurationSettings", "methodname_flat": "SteamAPI_ISteamInput_GetSessionInputConfigurationSettings",
"params": [], "params": [],
"returntype": "uint16" "returntype": "uint16"
},
{
"methodname": "SetDualSenseTriggerEffect",
"methodname_flat": "SteamAPI_ISteamInput_SetDualSenseTriggerEffect",
"params": [
{ "paramname":"inputHandle", "paramtype":"InputHandle_t" },
{ "paramname":"pParam", "paramtype":"const ScePadTriggerEffectParam *" }
],
"returntype": "void"
} }
], ],
"version_string": "SteamInput006" "version_string": "SteamInput006"

View File

@ -176,6 +176,10 @@ S_API int SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages( ISteamFr
S_API void SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog( ISteamFriends* self, uint64_steamid steamIDLobby ); S_API void SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog( ISteamFriends* self, uint64_steamid steamIDLobby );
S_API bool SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser( ISteamFriends* self, const char * pchProtocol ); S_API bool SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser( ISteamFriends* self, const char * pchProtocol );
S_API void SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialogConnectString( ISteamFriends* self, const char * pchConnectString ); S_API void SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialogConnectString( ISteamFriends* self, const char * pchConnectString );
S_API SteamAPICall_t SteamAPI_ISteamFriends_RequestEquippedProfileItems( ISteamFriends* self, uint64_steamid steamID );
S_API bool SteamAPI_ISteamFriends_BHasEquippedProfileItem( ISteamFriends* self, uint64_steamid steamID, ECommunityProfileItemType itemType );
S_API const char * SteamAPI_ISteamFriends_GetProfileItemPropertyString( ISteamFriends* self, uint64_steamid steamID, ECommunityProfileItemType itemType, ECommunityProfileItemProperty prop );
S_API uint32 SteamAPI_ISteamFriends_GetProfileItemPropertyUint( ISteamFriends* self, uint64_steamid steamID, ECommunityProfileItemType itemType, ECommunityProfileItemProperty prop );
// ISteamUtils // ISteamUtils
@ -506,6 +510,7 @@ S_API SteamAPICall_t SteamAPI_ISteamApps_GetFileDetails( ISteamApps* self, const
S_API int SteamAPI_ISteamApps_GetLaunchCommandLine( ISteamApps* self, char * pszCommandLine, int cubCommandLine ); S_API int SteamAPI_ISteamApps_GetLaunchCommandLine( ISteamApps* self, char * pszCommandLine, int cubCommandLine );
S_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( ISteamApps* self ); S_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( ISteamApps* self );
S_API bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uint32 * punSecondsAllowed, uint32 * punSecondsPlayed ); S_API bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uint32 * punSecondsAllowed, uint32 * punSecondsPlayed );
S_API bool SteamAPI_ISteamApps_SetDlcContext( ISteamApps* self, AppId_t nAppID );
// ISteamNetworking // ISteamNetworking
@ -702,6 +707,7 @@ S_API EInputActionOrigin SteamAPI_ISteamInput_TranslateActionOrigin( ISteamInput
S_API bool SteamAPI_ISteamInput_GetDeviceBindingRevision( ISteamInput* self, InputHandle_t inputHandle, int * pMajor, int * pMinor ); S_API bool SteamAPI_ISteamInput_GetDeviceBindingRevision( ISteamInput* self, InputHandle_t inputHandle, int * pMajor, int * pMinor );
S_API uint32 SteamAPI_ISteamInput_GetRemotePlaySessionID( ISteamInput* self, InputHandle_t inputHandle ); S_API uint32 SteamAPI_ISteamInput_GetRemotePlaySessionID( ISteamInput* self, InputHandle_t inputHandle );
S_API uint16 SteamAPI_ISteamInput_GetSessionInputConfigurationSettings( ISteamInput* self ); S_API uint16 SteamAPI_ISteamInput_GetSessionInputConfigurationSettings( ISteamInput* self );
S_API void SteamAPI_ISteamInput_SetDualSenseTriggerEffect( ISteamInput* self, InputHandle_t inputHandle, const ScePadTriggerEffectParam * pParam );
// ISteamController // ISteamController

View File

@ -137,6 +137,10 @@ enum EResult
k_EResultInvalidSignature = 121, // signature check did not match k_EResultInvalidSignature = 121, // signature check did not match
k_EResultParseFailure = 122, // Failed to parse input k_EResultParseFailure = 122, // Failed to parse input
k_EResultNoVerifiedPhone = 123, // account does not have a verified phone number k_EResultNoVerifiedPhone = 123, // account does not have a verified phone number
k_EResultInsufficientBattery = 124, // user device doesn't have enough battery charge currently to complete the action
k_EResultChargerRequired = 125, // The operation requires a charger to be plugged in, which wasn't present
k_EResultCachedCredentialInvalid = 126, // Cached credential was invalid - user must reauthenticate
K_EResultPhoneNumberIsVOIP = 127, // The phone number provided is a Voice Over IP number
}; };
// Error codes for use with the voice functions // Error codes for use with the voice functions
@ -592,37 +596,6 @@ public:
m_steamid.m_comp.m_unAccountInstance = 0; m_steamid.m_comp.m_unAccountInstance = 0;
} }
#if defined( INCLUDED_STEAM2_USERID_STRUCTS )
//-----------------------------------------------------------------------------
// Purpose: Initializes a steam ID from a Steam2 ID structure
// Input: pTSteamGlobalUserID - Steam2 ID to convert
// eUniverse - universe this ID belongs to
//-----------------------------------------------------------------------------
void SetFromSteam2( TSteamGlobalUserID *pTSteamGlobalUserID, EUniverse eUniverse )
{
m_steamid.m_comp.m_unAccountID = pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits * 2 +
pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
m_steamid.m_comp.m_EUniverse = eUniverse; // set the universe
m_steamid.m_comp.m_EAccountType = k_EAccountTypeIndividual; // Steam 2 accounts always map to account type of individual
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDefaultInstance; // Steam2 only knew one instance
}
//-----------------------------------------------------------------------------
// Purpose: Fills out a Steam2 ID structure
// Input: pTSteamGlobalUserID - Steam2 ID to write to
//-----------------------------------------------------------------------------
void ConvertToSteam2( TSteamGlobalUserID *pTSteamGlobalUserID ) const
{
// only individual accounts have any meaning in Steam 2, only they can be mapped
// Assert( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual );
pTSteamGlobalUserID->m_SteamInstanceID = 0;
pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits = m_steamid.m_comp.m_unAccountID % 2;
pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits = m_steamid.m_comp.m_unAccountID / 2;
}
#endif // defined( INCLUDED_STEAM_COMMON_STEAMCOMMON_H )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Converts steam ID to its 64-bit representation // Purpose: Converts steam ID to its 64-bit representation
// Output : 64-bit representation of a Steam ID // Output : 64-bit representation of a Steam ID
@ -794,7 +767,6 @@ public:
// and is preferred when the caller knows it's safe to be strict. // and is preferred when the caller knows it's safe to be strict.
// Returns whether the string parsed correctly. // Returns whether the string parsed correctly.
bool SetFromStringStrict( const char *pchSteamID, EUniverse eDefaultUniverse ); bool SetFromStringStrict( const char *pchSteamID, EUniverse eDefaultUniverse );
bool SetFromSteam2String( const char *pchSteam2ID, EUniverse eUniverse );
inline bool operator==( const CSteamID &val ) const { return m_steamid.m_unAll64Bits == val.m_steamid.m_unAll64Bits; } inline bool operator==( const CSteamID &val ) const { return m_steamid.m_unAll64Bits == val.m_steamid.m_unAll64Bits; }
inline bool operator!=( const CSteamID &val ) const { return !operator==( val ); } inline bool operator!=( const CSteamID &val ) const { return !operator==( val ); }
@ -863,6 +835,41 @@ inline bool CSteamID::IsValid() const
return true; return true;
} }
#if defined( INCLUDED_STEAM2_USERID_STRUCTS )
//-----------------------------------------------------------------------------
// Purpose: Initializes a steam ID from a Steam2 ID structure
// Input: pTSteamGlobalUserID - Steam2 ID to convert
// eUniverse - universe this ID belongs to
//-----------------------------------------------------------------------------
inline CSteamID SteamIDFromSteam2UserID( TSteamGlobalUserID *pTSteamGlobalUserID, EUniverse eUniverse )
{
uint32 unAccountID = pTSteamGlobalUserID->m_SteamLocalUserID.Split.Low32bits * 2 +
pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
return CSteamID( unAccountID, k_unSteamUserDefaultInstance, eUniverse, k_EAccountTypeIndividual );
}
bool SteamIDFromSteam2String( const char *pchSteam2ID, EUniverse eUniverse, CSteamID *pSteamIDOut );
//-----------------------------------------------------------------------------
// Purpose: Fills out a Steam2 ID structure
// Input: pTSteamGlobalUserID - Steam2 ID to write to
//-----------------------------------------------------------------------------
inline TSteamGlobalUserID SteamIDToSteam2UserID( CSteamID steamID )
{
TSteamGlobalUserID steamGlobalUserID;
steamGlobalUserID.m_SteamInstanceID = 0;
steamGlobalUserID.m_SteamLocalUserID.Split.High32bits = steamID.GetAccountID() % 2;
steamGlobalUserID.m_SteamLocalUserID.Split.Low32bits = steamID.GetAccountID() / 2;
return steamGlobalUserID;
}
#endif
// generic invalid CSteamID // generic invalid CSteamID
#define k_steamIDNil CSteamID() #define k_steamIDNil CSteamID()

View File

@ -15,13 +15,11 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// SteamNetworkingSockets config. // SteamNetworkingSockets config.
//#define STEAMNETWORKINGSOCKETS_STANDALONELIB // Comment this in to support compiling/linking with the standalone library / gamenetworkingsockets opensource #if !defined(STEAMNETWORKINGSOCKETS_STANDALONELIB) && !defined(STEAMNETWORKINGSOCKETS_STEAMAPI)
#define STEAMNETWORKINGSOCKETS_STEAMAPI // Compiling/link with steam_api.h and Steamworks SDK #define STEAMNETWORKINGSOCKETS_STEAMAPI
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if !defined( STEAMNETWORKINGSOCKETS_OPENSOURCE ) && !defined( STEAMNETWORKINGSOCKETS_STREAMINGCLIENT )
#define STEAMNETWORKINGSOCKETS_STEAM
#endif
#ifdef NN_NINTENDO_SDK // We always static link on Nintendo #ifdef NN_NINTENDO_SDK // We always static link on Nintendo
#define STEAMNETWORKINGSOCKETS_STATIC_LINK #define STEAMNETWORKINGSOCKETS_STATIC_LINK
#endif #endif
@ -143,6 +141,12 @@ enum ESteamNetworkingIdentityType
// Basic platform-specific identifiers. // Basic platform-specific identifiers.
// //
k_ESteamNetworkingIdentityType_SteamID = 16, // 64-bit CSteamID k_ESteamNetworkingIdentityType_SteamID = 16, // 64-bit CSteamID
k_ESteamNetworkingIdentityType_XboxPairwiseID = 17, // Publisher-specific user identity, as string
k_ESteamNetworkingIdentityType_SonyPSN = 18, // 64-bit ID
k_ESteamNetworkingIdentityType_GoogleStadia = 19, // 64-bit ID
//k_ESteamNetworkingIdentityType_NintendoNetworkServiceAccount,
//k_ESteamNetworkingIdentityType_EpicGameStore
//k_ESteamNetworkingIdentityType_WeGame
// //
// Special identifiers. // Special identifiers.
@ -271,6 +275,15 @@ struct SteamNetworkingIdentity
void SetSteamID64( uint64 steamID ); // Takes SteamID as raw 64-bit number void SetSteamID64( uint64 steamID ); // Takes SteamID as raw 64-bit number
uint64 GetSteamID64() const; // Returns 0 if identity is not SteamID uint64 GetSteamID64() const; // Returns 0 if identity is not SteamID
bool SetXboxPairwiseID( const char *pszString ); // Returns false if invalid length
const char *GetXboxPairwiseID() const; // Returns nullptr if not Xbox ID
void SetPSNID( uint64 id );
uint64 GetPSNID() const; // Returns 0 if not PSN
void SetStadiaID( uint64 id );
uint64 GetStadiaID() const; // Returns 0 if not Stadia
void SetIPAddr( const SteamNetworkingIPAddr &addr ); // Set to specified IP:port void SetIPAddr( const SteamNetworkingIPAddr &addr ); // Set to specified IP:port
const SteamNetworkingIPAddr *GetIPAddr() const; // returns null if we are not an IP address. const SteamNetworkingIPAddr *GetIPAddr() const; // returns null if we are not an IP address.
void SetIPv4Addr( uint32 nIPv4, uint16 nPort ); // Set to specified IPv4:port void SetIPv4Addr( uint32 nIPv4, uint16 nPort ); // Set to specified IPv4:port
@ -312,6 +325,7 @@ struct SteamNetworkingIdentity
enum { enum {
k_cchMaxString = 128, // Max length of the buffer needed to hold any identity, formatted in string format by ToString k_cchMaxString = 128, // Max length of the buffer needed to hold any identity, formatted in string format by ToString
k_cchMaxGenericString = 32, // Max length of the string for generic string identities. Including terminating '\0' k_cchMaxGenericString = 32, // Max length of the string for generic string identities. Including terminating '\0'
k_cchMaxXboxPairwiseID = 33, // Including terminating '\0'
k_cbMaxGenericBytes = 32, k_cbMaxGenericBytes = 32,
}; };
@ -324,7 +338,10 @@ struct SteamNetworkingIdentity
int m_cbSize; int m_cbSize;
union { union {
uint64 m_steamID64; uint64 m_steamID64;
uint64 m_PSNID;
uint64 m_stadiaID;
char m_szGenericString[ k_cchMaxGenericString ]; char m_szGenericString[ k_cchMaxGenericString ];
char m_szXboxPairwiseID[ k_cchMaxXboxPairwiseID ];
uint8 m_genericBytes[ k_cbMaxGenericBytes ]; uint8 m_genericBytes[ k_cbMaxGenericBytes ];
char m_szUnknownRawString[ k_cchMaxString ]; char m_szUnknownRawString[ k_cchMaxString ];
SteamNetworkingIPAddr m_ip; SteamNetworkingIPAddr m_ip;
@ -1479,7 +1496,11 @@ enum ESteamNetworkingConfigValue
/// route ping time and is then adjusted.) /// route ping time and is then adjusted.)
k_ESteamNetworkingConfig_P2P_Transport_ICE_Penalty = 105, k_ESteamNetworkingConfig_P2P_Transport_ICE_Penalty = 105,
k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty = 106, k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty = 106,
k_ESteamNetworkingConfig_P2P_TURN_ServerList = 107,
k_ESteamNetworkingConfig_P2P_TURN_UserList = 108,
k_ESteamNetworkingConfig_P2P_TURN_PassList = 109,
//k_ESteamNetworkingConfig_P2P_Transport_LANBeacon_Penalty = 107, //k_ESteamNetworkingConfig_P2P_Transport_LANBeacon_Penalty = 107,
k_ESteamNetworkingConfig_P2P_Transport_ICE_Implementation = 110,
// //
// Settings for SDR relayed connections // Settings for SDR relayed connections
@ -1695,7 +1716,9 @@ inline SteamNetworkingPOPID CalculateSteamNetworkingPOPIDFromString( const char
template <int N> template <int N>
inline void GetSteamNetworkingLocationPOPStringFromID( SteamNetworkingPOPID id, char (&szCode)[N] ) inline void GetSteamNetworkingLocationPOPStringFromID( SteamNetworkingPOPID id, char (&szCode)[N] )
{ {
#if !defined( __GNUC__ ) || __GNUC__ >= 5
static_assert( N >= 5, "Fixed-size buffer not big enough to hold SDR POP ID" ); static_assert( N >= 5, "Fixed-size buffer not big enough to hold SDR POP ID" );
#endif
szCode[0] = char( id >> 16U ); szCode[0] = char( id >> 16U );
szCode[1] = char( id >> 8U ); szCode[1] = char( id >> 8U );
szCode[2] = char( id ); szCode[2] = char( id );
@ -1744,8 +1767,18 @@ inline void SteamNetworkingIdentity::SetSteamID( CSteamID steamID ) { SetSteamID
inline CSteamID SteamNetworkingIdentity::GetSteamID() const { return CSteamID( GetSteamID64() ); } inline CSteamID SteamNetworkingIdentity::GetSteamID() const { return CSteamID( GetSteamID64() ); }
inline void SteamNetworkingIdentity::SetSteamID64( uint64 steamID ) { m_eType = k_ESteamNetworkingIdentityType_SteamID; m_cbSize = sizeof( m_steamID64 ); m_steamID64 = steamID; } inline void SteamNetworkingIdentity::SetSteamID64( uint64 steamID ) { m_eType = k_ESteamNetworkingIdentityType_SteamID; m_cbSize = sizeof( m_steamID64 ); m_steamID64 = steamID; }
inline uint64 SteamNetworkingIdentity::GetSteamID64() const { return m_eType == k_ESteamNetworkingIdentityType_SteamID ? m_steamID64 : 0; } inline uint64 SteamNetworkingIdentity::GetSteamID64() const { return m_eType == k_ESteamNetworkingIdentityType_SteamID ? m_steamID64 : 0; }
inline bool SteamNetworkingIdentity::SetXboxPairwiseID( const char *pszString ) { size_t l = strlen( pszString ); if ( l < 1 || l >= sizeof(m_szXboxPairwiseID) ) return false;
m_eType = k_ESteamNetworkingIdentityType_XboxPairwiseID; m_cbSize = int(l+1); memcpy( m_szXboxPairwiseID, pszString, m_cbSize ); return true; }
inline const char *SteamNetworkingIdentity::GetXboxPairwiseID() const { return m_eType == k_ESteamNetworkingIdentityType_XboxPairwiseID ? m_szXboxPairwiseID : NULL; }
inline void SteamNetworkingIdentity::SetPSNID( uint64 id ) { m_eType = k_ESteamNetworkingIdentityType_SonyPSN; m_cbSize = sizeof( m_PSNID ); m_PSNID = id; }
inline uint64 SteamNetworkingIdentity::GetPSNID() const { return m_eType == k_ESteamNetworkingIdentityType_SonyPSN ? m_PSNID : 0; }
inline void SteamNetworkingIdentity::SetStadiaID( uint64 id ) { m_eType = k_ESteamNetworkingIdentityType_GoogleStadia; m_cbSize = sizeof( m_stadiaID ); m_stadiaID = id; }
inline uint64 SteamNetworkingIdentity::GetStadiaID() const { return m_eType == k_ESteamNetworkingIdentityType_GoogleStadia ? m_stadiaID : 0; }
inline void SteamNetworkingIdentity::SetIPAddr( const SteamNetworkingIPAddr &addr ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip = addr; } inline void SteamNetworkingIdentity::SetIPAddr( const SteamNetworkingIPAddr &addr ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip = addr; }
inline const SteamNetworkingIPAddr *SteamNetworkingIdentity::GetIPAddr() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? &m_ip : NULL; } inline const SteamNetworkingIPAddr *SteamNetworkingIdentity::GetIPAddr() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? &m_ip : NULL; }
inline void SteamNetworkingIdentity::SetIPv4Addr( uint32 nIPv4, uint16 nPort ) { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip.SetIPv4( nIPv4, nPort ); }
inline uint32 SteamNetworkingIdentity::GetIPv4() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? m_ip.GetIPv4() : 0; }
inline ESteamNetworkingFakeIPType SteamNetworkingIdentity::GetFakeIPType() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress ? m_ip.GetFakeIPType() : k_ESteamNetworkingFakeIPType_Invalid; }
inline void SteamNetworkingIdentity::SetLocalHost() { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip.SetIPv6LocalHost(); } inline void SteamNetworkingIdentity::SetLocalHost() { m_eType = k_ESteamNetworkingIdentityType_IPAddress; m_cbSize = (int)sizeof(m_ip); m_ip.SetIPv6LocalHost(); }
inline bool SteamNetworkingIdentity::IsLocalHost() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress && m_ip.IsLocalHost(); } inline bool SteamNetworkingIdentity::IsLocalHost() const { return m_eType == k_ESteamNetworkingIdentityType_IPAddress && m_ip.IsLocalHost(); }
inline bool SteamNetworkingIdentity::SetGenericString( const char *pszString ) { size_t l = strlen( pszString ); if ( l >= sizeof(m_szGenericString) ) return false; inline bool SteamNetworkingIdentity::SetGenericString( const char *pszString ) { size_t l = strlen( pszString ); if ( l >= sizeof(m_szGenericString) ) return false;

Binary file not shown.

View File

@ -11,6 +11,16 @@ PluginImporter:
isExplicitlyReferenced: 0 isExplicitlyReferenced: 0
validateReferences: 1 validateReferences: 1
platformData: platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 1
- first: - first:
Any: Any:
second: second:
@ -21,12 +31,33 @@ PluginImporter:
second: second:
enabled: 1 enabled: 1
settings: settings:
CPU: AnyCPU
DefaultValueInitialized: true DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first: - first:
Standalone: OSXUniversal Standalone: OSXUniversal
second: second:
enabled: 1 enabled: 1
settings: {} settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: x86_64
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant: