Skip to content

Commit

Permalink
Merge pull request #613 from rlabrecque/rlabrecque/update-to-1.58a
Browse files Browse the repository at this point in the history
Update to Steamworks SDK 1.58a
  • Loading branch information
rlabrecque authored Jun 17, 2024
2 parents 37df82e + a5222ef commit ac8d019
Show file tree
Hide file tree
Showing 31 changed files with 430 additions and 100 deletions.
6 changes: 6 additions & 0 deletions CodeGen/src/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@
"ISteamUGC_StopPlaytimeTracking": {
"pvecPublishedFileID": "PublishedFileId_t[]",
},
"ISteamUGC_GetUserContentDescriptorPreferences": {
"pvecDescriptors": "EUGCContentDescriptorID[]",
},
"ISteamUser_InitiateGameConnection_DEPRECATED": {
"pAuthBlob": "byte[]",
},
Expand Down Expand Up @@ -335,6 +338,9 @@
"ISteamGameServerUGC_StopPlaytimeTracking": {
"pvecPublishedFileID": "PublishedFileId_t[]",
},
"ISteamGameServerUGC_GetUserContentDescriptorPreferences": {
"pvecDescriptors": "EUGCContentDescriptorID[]",
},

# This is a little nicety that we provide, I don't know why Valve doesn't just change it.
"ISteamFriends_GetFriendCount": {
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/steam/isteamclient.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//====== Copyright Valve Corporation, All rights reserved. ====================
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Internal low-level access to Steamworks interfaces.
//
Expand Down
1 change: 1 addition & 0 deletions CodeGen/steam/isteamfriends.h
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ struct GameOverlayActivated_t
uint8 m_bActive; // true if it's just been activated, false otherwise
bool m_bUserInitiated; // true if the user asked for the overlay to be activated/deactivated
AppId_t m_nAppID; // the appID of the game (should always be the current game)
uint32 m_dwOverlayPID; // used internally
};


Expand Down
11 changes: 5 additions & 6 deletions CodeGen/steam/isteamnetworkingsockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class ISteamNetworkingSockets
/// WARNING: Be *very careful* when using the value provided in callbacks structs.
/// Callbacks are queued, and the value that you will receive in your
/// callback is the userdata that was effective at the time the callback
/// was queued. There are subtle race conditions that can hapen if you
/// was queued. There are subtle race conditions that can happen if you
/// don't understand this!
///
/// If any incoming messages for this connection are queued, the userdata
Expand Down Expand Up @@ -397,10 +397,9 @@ class ISteamNetworkingSockets
/// lanes may be sent out of order. Each lane has its own message number
/// sequence. The first message sent on each lane will be assigned the number 1.
///
/// Each lane has a "priority". Lower priority lanes will only be processed
/// when all higher-priority lanes are empty. The magnitudes of the priority
/// values are not relevant, only their sort order. Higher numeric values
/// take priority over lower numeric values.
/// Each lane has a "priority". Lanes with higher numeric values will only be processed
/// when all lanes with lower number values are empty. The magnitudes of the priority
/// values are not relevant, only their sort order.
///
/// Each lane also is assigned a weight, which controls the approximate proportion
/// of the bandwidth that will be consumed by the lane, relative to other lanes
Expand Down Expand Up @@ -829,7 +828,7 @@ class ISteamNetworkingSockets
/// different types of traffic. Because these allocations come from a global
/// namespace, there is a relatively strict limit on the maximum number of
/// ports you may request. (At the time of this writing, the limit is 4.)
/// The Port assignments are *not* guaranteed to have any particular order
/// The port assignments are *not* guaranteed to have any particular order
/// or relationship! Do *not* assume they are contiguous, even though that
/// may often occur in practice.
///
Expand Down
9 changes: 7 additions & 2 deletions CodeGen/steam/isteamremoteplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,17 @@ class ISteamRemotePlay
// This is set to 0x0 if the resolution is not available
virtual bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, int *pnResolutionX, int *pnResolutionY ) = 0;

// Start Remote Play Together and optionally show the UI in the overlay
// This returns false if Remote Play Together can't be started or your game is not configured for Remote Play Together
virtual bool BStartRemotePlayTogether( bool bShowOverlay = true ) = 0;

// 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
// This will automatically start Remote Play Together if it hasn't already been started
// This returns false if the invite can't be sent or your game is not configured for Remote Play Together
virtual bool BSendRemotePlayTogetherInvite( CSteamID steamIDFriend ) = 0;
};

#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION001"
#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION002"

// Global interface accessor
inline ISteamRemotePlay *SteamRemotePlay();
Expand Down
7 changes: 5 additions & 2 deletions CodeGen/steam/isteamugc.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class ISteamUGC
virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set
virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax)
virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item
virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags ) = 0; // change the tags of an UGC item
virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags, bool bAllowAdminTags = false ) = 0; // change the tags of an UGC item
virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder
virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size
virtual bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, bool bAllowLegacyUpload ) = 0; // use legacy upload for a single small file. The parameter to SetItemContent() should either be a directory with one file or the full path to the file. The file must also be less than 10MB in size.
Expand Down Expand Up @@ -382,9 +382,12 @@ class ISteamUGC
// Retrieve information related to the user's acceptance or not of the app's specific Workshop EULA
STEAM_CALL_RESULT( WorkshopEULAStatus_t )
virtual SteamAPICall_t GetWorkshopEULAStatus() = 0;

// Return the user's community content descriptor preferences
virtual uint32 GetUserContentDescriptorPreferences( EUGCContentDescriptorID *pvecDescriptors, uint32 cMaxEntries ) = 0;
};

#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION017"
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION018"

// Global interface accessor
inline ISteamUGC *SteamUGC();
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/steam/isteamutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ struct IPCountry_t


//-----------------------------------------------------------------------------
// Purpose: Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute
// Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute
//-----------------------------------------------------------------------------
struct LowBatteryPower_t
{
Expand Down
73 changes: 69 additions & 4 deletions CodeGen/steam/steam_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,32 @@
//
//----------------------------------------------------------------------------------------------------------------------------------------------------------//


// SteamAPI_Init must be called before using any other API functions. If it fails, an
// error message will be output to the debugger (or stderr) with further information.
S_API bool S_CALLTYPE SteamAPI_Init();
enum ESteamAPIInitResult
{
k_ESteamAPIInitResult_OK = 0,
k_ESteamAPIInitResult_FailedGeneric = 1, // Some other failure
k_ESteamAPIInitResult_NoSteamClient = 2, // We cannot connect to Steam, steam probably isn't running
k_ESteamAPIInitResult_VersionMismatch = 3, // Steam client appears to be out of date
};

// Initialize the Steamworks SDK.
// On success k_ESteamAPIInitResult_OK is returned. Otherwise, if pOutErrMsg is non-NULL,
// it will receive a non-localized message that explains the reason for the failure
//
// Example usage:
//
// SteamErrMsg errMsg;
// if ( SteamAPI_Init(&errMsg) != k_ESteamAPIInitResult_OK )
// FatalError( "Failed to init Steam. %s", errMsg );
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg );

// Initialize the SDK, without worrying about the cause of failure.
// This function is included for compatibility with older SDK.
// You can use it if you don't care about decent error handling
inline bool SteamAPI_Init()
{
return SteamAPI_InitEx( NULL ) == k_ESteamAPIInitResult_OK;
}

// SteamAPI_Shutdown should be called during process shutdown if possible.
S_API void S_CALLTYPE SteamAPI_Shutdown();
Expand Down Expand Up @@ -294,4 +316,47 @@ inline bool CSteamAPIContext::Init()

#endif

// Internal implementation of SteamAPI_InitEx. This is done in a way that checks
// all of the versions of interfaces from headers being compiled into this code.
// If you are not using any of the C++ interfaces and do not need this version checking
// (for example if you are only using the "flat" interfaces, which have a different type
// of version checking), you can pass a NULL interface version string.
S_API ESteamAPIInitResult S_CALLTYPE SteamInternal_SteamAPI_Init( const char *pszInternalCheckInterfaceVersions, SteamErrMsg *pOutErrMsg );
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg )
{
const char *pszInternalCheckInterfaceVersions =
STEAMUTILS_INTERFACE_VERSION "\0"
STEAMNETWORKINGUTILS_INTERFACE_VERSION "\0"

STEAMAPPLIST_INTERFACE_VERSION "\0"
STEAMAPPS_INTERFACE_VERSION "\0"
STEAMCONTROLLER_INTERFACE_VERSION "\0"
STEAMFRIENDS_INTERFACE_VERSION "\0"
STEAMGAMESEARCH_INTERFACE_VERSION "\0"
STEAMHTMLSURFACE_INTERFACE_VERSION "\0"
STEAMHTTP_INTERFACE_VERSION "\0"
STEAMINPUT_INTERFACE_VERSION "\0"
STEAMINVENTORY_INTERFACE_VERSION "\0"
STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION "\0"
STEAMMATCHMAKING_INTERFACE_VERSION "\0"
STEAMMUSICREMOTE_INTERFACE_VERSION "\0"
STEAMMUSIC_INTERFACE_VERSION "\0"
STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "\0"
STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "\0"
STEAMNETWORKING_INTERFACE_VERSION "\0"
STEAMPARENTALSETTINGS_INTERFACE_VERSION "\0"
STEAMPARTIES_INTERFACE_VERSION "\0"
STEAMREMOTEPLAY_INTERFACE_VERSION "\0"
STEAMREMOTESTORAGE_INTERFACE_VERSION "\0"
STEAMSCREENSHOTS_INTERFACE_VERSION "\0"
STEAMUGC_INTERFACE_VERSION "\0"
STEAMUSERSTATS_INTERFACE_VERSION "\0"
STEAMUSER_INTERFACE_VERSION "\0"
STEAMVIDEO_INTERFACE_VERSION "\0"

"\0";

return SteamInternal_SteamAPI_Init( pszInternalCheckInterfaceVersions, pOutErrMsg );
}

#endif // STEAM_API_H
Loading

0 comments on commit ac8d019

Please sign in to comment.