diff --git a/.idea/cmake.xml b/.idea/cmake.xml
index b2fd445..62f3b2a 100644
--- a/.idea/cmake.xml
+++ b/.idea/cmake.xml
@@ -2,8 +2,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 11c54c1..bfce2f8 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -54,7 +54,6 @@
-
@@ -75,7 +74,6 @@
-
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
index 79ee123..d728745 100644
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..e3e08d4
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/exports_generator__64_.xml b/.idea/runConfigurations/exports_generator__64_.xml
index 478fb8d..7b9440b 100644
--- a/.idea/runConfigurations/exports_generator__64_.xml
+++ b/.idea/runConfigurations/exports_generator__64_.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2116708..f193a6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 3.24)
project(SmokeAPI VERSION 3.1.3)
include(KoalaBox/cmake/KoalaBox.cmake)
-
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ add_definitions(-DKB_DEBUG)
+endif()
add_subdirectory(KoalaBox)
add_subdirectory(tools)
diff --git a/KoalaBox b/KoalaBox
index b17756b..e38fa5d 160000
--- a/KoalaBox
+++ b/KoalaBox
@@ -1 +1 @@
-Subproject commit b17756ba6a82b558ec47b2a29376dbe7245e6a14
+Subproject commit e38fa5d2b2440c2cff81bd89188593cda6db02ed
diff --git a/res/interface_lookup.json b/res/interface_lookup.json
index bb079e5..703060c 100644
--- a/res/interface_lookup.json
+++ b/res/interface_lookup.json
@@ -18,6 +18,22 @@
"SetGameType": 12,
"BGetUserAchievementStatus": 13
},
+ "SteamMasterServerUpdater001": {
+ "SetActive": 0,
+ "SetHeartbeatInterval": 1,
+ "HandleIncomingPacket": 2,
+ "GetNextOutgoingPacket": 3,
+ "SetBasicServerData": 4,
+ "ClearAllKeyValues": 5,
+ "SetKeyValue": 6,
+ "NotifyShutdown": 7,
+ "WasRestartRequested": 8,
+ "ForceHeartbeat": 9,
+ "AddMasterServer": 10,
+ "RemoveMasterServer": 11,
+ "GetNumMasterServers": 12,
+ "GetMasterServerAddress": 13
+ },
"SteamFriends003": {
"GetPersonaName": 0,
"SetPersonaName": 1,
@@ -64,22 +80,6 @@
"SetWarningMessageHook": 20,
"GetISteamRemoteStorage": 21
},
- "SteamMasterServerUpdater001": {
- "SetActive": 0,
- "SetHeartbeatInterval": 1,
- "HandleIncomingPacket": 2,
- "GetNextOutgoingPacket": 3,
- "SetBasicServerData": 4,
- "ClearAllKeyValues": 5,
- "SetKeyValue": 6,
- "NotifyShutdown": 7,
- "WasRestartRequested": 8,
- "ForceHeartbeat": 9,
- "AddMasterServer": 10,
- "RemoveMasterServer": 11,
- "GetNumMasterServers": 12,
- "GetMasterServerAddress": 13
- },
"SteamNetworking001": {
"CreateListenSocket": 0,
"CreateP2PConnectionSocket": 1,
@@ -261,6 +261,25 @@
"GetCompressedVoice": 9,
"DecompressVoice": 10
},
+ "SteamGameServer008": {
+ "LogOn": 0,
+ "LogOff": 1,
+ "BLoggedOn": 2,
+ "BSecure": 3,
+ "GetSteamID": 4,
+ "SendUserConnectAndAuthenticate": 5,
+ "CreateUnauthenticatedUserConnection": 6,
+ "SendUserDisconnect": 7,
+ "BUpdateUserData": 8,
+ "BSetServerType": 9,
+ "UpdateServerStatus": 10,
+ "UpdateSpectatorPort": 11,
+ "SetGameType": 12,
+ "BGetUserAchievementStatus": 13,
+ "GetGameplayStats": 14,
+ "RequestUserGroupStatus": 15,
+ "GetPublicIP": 16
+ },
"SteamFriends005": {
"GetPersonaName": 0,
"SetPersonaName": 1,
@@ -287,24 +306,14 @@
"ActivateGameOverlayToStore": 22,
"SetPlayedWith": 23
},
- "SteamGameServer008": {
- "LogOn": 0,
- "LogOff": 1,
- "BLoggedOn": 2,
- "BSecure": 3,
- "GetSteamID": 4,
- "SendUserConnectAndAuthenticate": 5,
- "CreateUnauthenticatedUserConnection": 6,
- "SendUserDisconnect": 7,
- "BUpdateUserData": 8,
- "BSetServerType": 9,
- "UpdateServerStatus": 10,
- "UpdateSpectatorPort": 11,
- "SetGameType": 12,
- "BGetUserAchievementStatus": 13,
- "GetGameplayStats": 14,
- "RequestUserGroupStatus": 15,
- "GetPublicIP": 16
+ "STEAMREMOTESTORAGE_INTERFACE_VERSION002": {
+ "FileWrite": 0,
+ "GetFileSize": 1,
+ "FileRead": 2,
+ "FileExists": 3,
+ "GetFileCount": 4,
+ "GetFileNameAndSize": 5,
+ "GetQuota": 6
},
"SteamNetworking002": {
"CreateListenSocket": 0,
@@ -322,15 +331,6 @@
"GetSocketConnectionType": 12,
"GetMaxPacketSize": 13
},
- "STEAMREMOTESTORAGE_INTERFACE_VERSION002": {
- "FileWrite": 0,
- "GetFileSize": 1,
- "FileRead": 2,
- "FileExists": 3,
- "GetFileCount": 4,
- "GetFileNameAndSize": 5,
- "GetQuota": 6
- },
"STEAMUSERSTATS_INTERFACE_VERSION004": {
"RequestCurrentStats": 0,
"GetStat": 2,
@@ -653,31 +653,6 @@
"GetIPCCallCount": 20,
"SetWarningMessageHook": 21
},
- "SteamGameStats001": {
- "GetNewSession": 0,
- "EndSession": 1,
- "AddSessionAttributeInt": 2,
- "AddSessionAttributeString": 3,
- "AddSessionAttributeFloat": 4,
- "AddNewRow": 5,
- "CommitRow": 6,
- "CommitOutstandingRows": 7,
- "AddRowAttributeInt": 8,
- "AddRowAtributeString": 9,
- "AddRowAttributeFloat": 10,
- "AddSessionAttributeInt64": 11,
- "AddRowAttributeInt64": 12
- },
- "SteamGameServerStats001": {
- "RequestUserStats": 0,
- "GetUserStat": 2,
- "GetUserAchievement": 3,
- "SetUserStat": 5,
- "UpdateUserAvgRateStat": 6,
- "SetUserAchievement": 7,
- "ClearUserAchievement": 8,
- "StoreUserStats": 9
- },
"SteamGameServer010": {
"LogOn": 0,
"LogOff": 1,
@@ -703,6 +678,31 @@
"EndAuthSession": 21,
"CancelAuthTicket": 22
},
+ "SteamGameServerStats001": {
+ "RequestUserStats": 0,
+ "GetUserStat": 2,
+ "GetUserAchievement": 3,
+ "SetUserStat": 5,
+ "UpdateUserAvgRateStat": 6,
+ "SetUserAchievement": 7,
+ "ClearUserAchievement": 8,
+ "StoreUserStats": 9
+ },
+ "SteamGameStats001": {
+ "GetNewSession": 0,
+ "EndSession": 1,
+ "AddSessionAttributeInt": 2,
+ "AddSessionAttributeString": 3,
+ "AddSessionAttributeFloat": 4,
+ "AddNewRow": 5,
+ "CommitRow": 6,
+ "CommitOutstandingRows": 7,
+ "AddRowAttributeInt": 8,
+ "AddRowAtributeString": 9,
+ "AddRowAttributeFloat": 10,
+ "AddSessionAttributeInt64": 11,
+ "AddRowAttributeInt64": 12
+ },
"STEAMUSERSTATS_INTERFACE_VERSION007": {
"RequestCurrentStats": 0,
"GetStat": 2,
@@ -1746,37 +1746,6 @@
"LogOnAndCreateNewSteamAccountIfNeeded": 26,
"GetConsoleSteamID": 27
},
- "SteamUtils006": {
- "GetSecondsSinceAppActive": 0,
- "GetSecondsSinceComputerActive": 1,
- "GetConnectedUniverse": 2,
- "GetServerRealTime": 3,
- "GetIPCountry": 4,
- "GetImageSize": 5,
- "GetImageRGBA": 6,
- "GetCSERIPPort": 7,
- "GetCurrentBatteryPower": 8,
- "GetAppID": 9,
- "SetOverlayNotificationPosition": 10,
- "IsAPICallCompleted": 11,
- "GetAPICallFailureReason": 12,
- "GetAPICallResult": 13,
- "RunFrame": 14,
- "GetIPCCallCount": 15,
- "SetWarningMessageHook": 16,
- "IsOverlayEnabled": 17,
- "BOverlayNeedsPresent": 18,
- "ShowGamepadTextInput": 19,
- "GetEnteredGamepadTextLength": 20,
- "GetEnteredGamepadTextInput": 21,
- "GetSteamUILanguage": 22,
- "IsSteamRunningInVR": 23,
- "CheckFileSignature": 24,
- "PostPS3SysutilCallback": 25,
- "BIsReadyToShutdown": 26,
- "BIsPSNOnline": 27,
- "SetPSNGameBootInviteStrings": 28
- },
"STEAMREMOTESTORAGE_INTERFACE_VERSION011": {
"FileWrite": 0,
"FileRead": 1,
@@ -1836,6 +1805,37 @@
"SynchronizeToServer": 55,
"ResetFileRequestState": 56
},
+ "SteamUtils006": {
+ "GetSecondsSinceAppActive": 0,
+ "GetSecondsSinceComputerActive": 1,
+ "GetConnectedUniverse": 2,
+ "GetServerRealTime": 3,
+ "GetIPCountry": 4,
+ "GetImageSize": 5,
+ "GetImageRGBA": 6,
+ "GetCSERIPPort": 7,
+ "GetCurrentBatteryPower": 8,
+ "GetAppID": 9,
+ "SetOverlayNotificationPosition": 10,
+ "IsAPICallCompleted": 11,
+ "GetAPICallFailureReason": 12,
+ "GetAPICallResult": 13,
+ "RunFrame": 14,
+ "GetIPCCallCount": 15,
+ "SetWarningMessageHook": 16,
+ "IsOverlayEnabled": 17,
+ "BOverlayNeedsPresent": 18,
+ "ShowGamepadTextInput": 19,
+ "GetEnteredGamepadTextLength": 20,
+ "GetEnteredGamepadTextInput": 21,
+ "GetSteamUILanguage": 22,
+ "IsSteamRunningInVR": 23,
+ "CheckFileSignature": 24,
+ "PostPS3SysutilCallback": 25,
+ "BIsReadyToShutdown": 26,
+ "BIsPSNOnline": 27,
+ "SetPSNGameBootInviteStrings": 28
+ },
"STEAMAPPS_INTERFACE_VERSION006": {
"BIsSubscribed": 0,
"BIsLowViolence": 1,
@@ -2263,6 +2263,39 @@
"Set_SteamAPI_CCheckCallbackRegisteredInProcess": 33,
"GetISteamPS3OverlayRender": 34
},
+ "STEAMUGC_INTERFACE_VERSION003": {
+ "CreateQueryUserUGCRequest": 0,
+ "CreateQueryAllUGCRequest": 1,
+ "SendQueryUGCRequest": 2,
+ "GetQueryUGCResult": 3,
+ "ReleaseQueryUGCRequest": 4,
+ "AddRequiredTag": 5,
+ "AddExcludedTag": 6,
+ "SetReturnLongDescription": 7,
+ "SetReturnTotalOnly": 8,
+ "SetAllowCachedResponse": 9,
+ "SetCloudFileNameFilter": 10,
+ "SetMatchAnyTag": 11,
+ "SetSearchText": 12,
+ "SetRankedByTrendDays": 13,
+ "RequestUGCDetails": 14,
+ "CreateItem": 15,
+ "StartItemUpdate": 16,
+ "SetItemTitle": 17,
+ "SetItemDescription": 18,
+ "SetItemVisibility": 19,
+ "SetItemTags": 20,
+ "SetItemContent": 21,
+ "SetItemPreview": 22,
+ "SubmitItemUpdate": 23,
+ "GetItemUpdateProgress": 24,
+ "SubscribeItem": 25,
+ "UnsubscribeItem": 26,
+ "GetNumSubscribedItems": 27,
+ "GetSubscribedItems": 28,
+ "GetItemInstallInfo": 29,
+ "GetItemUpdateInfo": 30
+ },
"STEAMHTMLSURFACE_INTERFACE_VERSION_002": {
"Init": 0,
"Shutdown": 1,
@@ -2299,39 +2332,6 @@
"JSDialogResponse": 32,
"FileLoadDialogResponse": 33
},
- "STEAMUGC_INTERFACE_VERSION003": {
- "CreateQueryUserUGCRequest": 0,
- "CreateQueryAllUGCRequest": 1,
- "SendQueryUGCRequest": 2,
- "GetQueryUGCResult": 3,
- "ReleaseQueryUGCRequest": 4,
- "AddRequiredTag": 5,
- "AddExcludedTag": 6,
- "SetReturnLongDescription": 7,
- "SetReturnTotalOnly": 8,
- "SetAllowCachedResponse": 9,
- "SetCloudFileNameFilter": 10,
- "SetMatchAnyTag": 11,
- "SetSearchText": 12,
- "SetRankedByTrendDays": 13,
- "RequestUGCDetails": 14,
- "CreateItem": 15,
- "StartItemUpdate": 16,
- "SetItemTitle": 17,
- "SetItemDescription": 18,
- "SetItemVisibility": 19,
- "SetItemTags": 20,
- "SetItemContent": 21,
- "SetItemPreview": 22,
- "SubmitItemUpdate": 23,
- "GetItemUpdateProgress": 24,
- "SubscribeItem": 25,
- "UnsubscribeItem": 26,
- "GetNumSubscribedItems": 27,
- "GetSubscribedItems": 28,
- "GetItemInstallInfo": 29,
- "GetItemUpdateInfo": 30
- },
"STEAMAPPS_INTERFACE_VERSION007": {
"BIsSubscribed": 0,
"BIsLowViolence": 1,
@@ -2954,6 +2954,68 @@
"IsScreenshotsHooked": 7,
"AddVRScreenshotToLibrary": 8
},
+ "STEAMREMOTESTORAGE_INTERFACE_VERSION014": {
+ "FileWrite": 0,
+ "FileRead": 1,
+ "FileWriteAsync": 2,
+ "FileReadAsync": 3,
+ "FileReadAsyncComplete": 4,
+ "FileForget": 5,
+ "FileDelete": 6,
+ "FileShare": 7,
+ "SetSyncPlatforms": 8,
+ "FileWriteStreamOpen": 9,
+ "FileWriteStreamWriteChunk": 10,
+ "FileWriteStreamClose": 11,
+ "FileWriteStreamCancel": 12,
+ "FileExists": 13,
+ "FilePersisted": 14,
+ "GetFileSize": 15,
+ "GetFileTimestamp": 16,
+ "GetSyncPlatforms": 17,
+ "GetFileCount": 18,
+ "GetFileNameAndSize": 19,
+ "GetQuota": 20,
+ "IsCloudEnabledForAccount": 21,
+ "IsCloudEnabledForApp": 22,
+ "SetCloudEnabledForApp": 23,
+ "UGCDownload": 24,
+ "GetUGCDownloadProgress": 25,
+ "GetUGCDetails": 26,
+ "UGCRead": 27,
+ "GetCachedUGCCount": 28,
+ "PublishWorkshopFile": 29,
+ "CreatePublishedFileUpdateRequest": 30,
+ "UpdatePublishedFileFile": 31,
+ "UpdatePublishedFilePreviewFile": 32,
+ "UpdatePublishedFileTitle": 33,
+ "UpdatePublishedFileDescription": 34,
+ "UpdatePublishedFileVisibility": 35,
+ "UpdatePublishedFileTags": 36,
+ "CommitPublishedFileUpdate": 37,
+ "GetPublishedFileDetails": 38,
+ "DeletePublishedFile": 39,
+ "EnumerateUserPublishedFiles": 40,
+ "SubscribePublishedFile": 41,
+ "EnumerateUserSubscribedFiles": 42,
+ "UnsubscribePublishedFile": 43,
+ "UpdatePublishedFileSetChangeDescription": 44,
+ "GetPublishedItemVoteDetails": 45,
+ "UpdateUserPublishedItemVote": 46,
+ "GetUserPublishedItemVoteDetails": 47,
+ "EnumerateUserSharedWorkshopFiles": 48,
+ "PublishVideo": 49,
+ "SetUserPublishedFileAction": 50,
+ "EnumeratePublishedFilesByUserAction": 51,
+ "EnumeratePublishedWorkshopFiles": 52,
+ "UGCDownloadToLocation": 53,
+ "GetFileListFromServer": 54,
+ "FileFetch": 55,
+ "FilePersist": 56,
+ "SynchronizeToClient": 57,
+ "SynchronizeToServer": 58,
+ "ResetFileRequestState": 59
+ },
"STEAMUGC_INTERFACE_VERSION009": {
"CreateQueryUserUGCRequest": 0,
"CreateQueryAllUGCRequest": 1,
@@ -3023,68 +3085,6 @@
"StopPlaytimeTracking": 65,
"StopPlaytimeTrackingForAllItems": 66
},
- "STEAMREMOTESTORAGE_INTERFACE_VERSION014": {
- "FileWrite": 0,
- "FileRead": 1,
- "FileWriteAsync": 2,
- "FileReadAsync": 3,
- "FileReadAsyncComplete": 4,
- "FileForget": 5,
- "FileDelete": 6,
- "FileShare": 7,
- "SetSyncPlatforms": 8,
- "FileWriteStreamOpen": 9,
- "FileWriteStreamWriteChunk": 10,
- "FileWriteStreamClose": 11,
- "FileWriteStreamCancel": 12,
- "FileExists": 13,
- "FilePersisted": 14,
- "GetFileSize": 15,
- "GetFileTimestamp": 16,
- "GetSyncPlatforms": 17,
- "GetFileCount": 18,
- "GetFileNameAndSize": 19,
- "GetQuota": 20,
- "IsCloudEnabledForAccount": 21,
- "IsCloudEnabledForApp": 22,
- "SetCloudEnabledForApp": 23,
- "UGCDownload": 24,
- "GetUGCDownloadProgress": 25,
- "GetUGCDetails": 26,
- "UGCRead": 27,
- "GetCachedUGCCount": 28,
- "PublishWorkshopFile": 29,
- "CreatePublishedFileUpdateRequest": 30,
- "UpdatePublishedFileFile": 31,
- "UpdatePublishedFilePreviewFile": 32,
- "UpdatePublishedFileTitle": 33,
- "UpdatePublishedFileDescription": 34,
- "UpdatePublishedFileVisibility": 35,
- "UpdatePublishedFileTags": 36,
- "CommitPublishedFileUpdate": 37,
- "GetPublishedFileDetails": 38,
- "DeletePublishedFile": 39,
- "EnumerateUserPublishedFiles": 40,
- "SubscribePublishedFile": 41,
- "EnumerateUserSubscribedFiles": 42,
- "UnsubscribePublishedFile": 43,
- "UpdatePublishedFileSetChangeDescription": 44,
- "GetPublishedItemVoteDetails": 45,
- "UpdateUserPublishedItemVote": 46,
- "GetUserPublishedItemVoteDetails": 47,
- "EnumerateUserSharedWorkshopFiles": 48,
- "PublishVideo": 49,
- "SetUserPublishedFileAction": 50,
- "EnumeratePublishedFilesByUserAction": 51,
- "EnumeratePublishedWorkshopFiles": 52,
- "UGCDownloadToLocation": 53,
- "GetFileListFromServer": 54,
- "FileFetch": 55,
- "FilePersist": 56,
- "SynchronizeToClient": 57,
- "SynchronizeToServer": 58,
- "ResetFileRequestState": 59
- },
"SteamController005": {
"Init": 0,
"Shutdown": 1,
@@ -3225,12 +3225,6 @@
"GetAppDependencies": 72,
"DeleteItem": 73
},
- "STEAMVIDEO_INTERFACE_V002": {
- "GetVideoURL": 0,
- "IsBroadcasting": 1,
- "GetOPFSettings": 2,
- "GetOPFStringForApp": 3
- },
"SteamUtils009": {
"GetSecondsSinceAppActive": 0,
"GetSecondsSinceComputerActive": 1,
@@ -3267,6 +3261,12 @@
"FilterText": 32,
"GetIPv6ConnectivityState": 33
},
+ "STEAMVIDEO_INTERFACE_V002": {
+ "GetVideoURL": 0,
+ "IsBroadcasting": 1,
+ "GetOPFSettings": 2,
+ "GetOPFStringForApp": 3
+ },
"STEAMHTMLSURFACE_INTERFACE_VERSION_004": {
"Init": 0,
"Shutdown": 1,
@@ -3346,6 +3346,48 @@
"GetGlyphForActionOrigin": 29,
"GetInputTypeForHandle": 30
},
+ "SteamClient018": {
+ "CreateSteamPipe": 0,
+ "BReleaseSteamPipe": 1,
+ "ConnectToGlobalUser": 2,
+ "CreateLocalUser": 3,
+ "ReleaseUser": 4,
+ "GetISteamUser": 5,
+ "GetISteamGameServer": 6,
+ "SetLocalIPBinding": 7,
+ "GetISteamFriends": 8,
+ "GetISteamUtils": 9,
+ "GetISteamMatchmaking": 10,
+ "GetISteamMatchmakingServers": 11,
+ "GetISteamGenericInterface": 12,
+ "GetISteamUserStats": 13,
+ "GetISteamGameServerStats": 14,
+ "GetISteamApps": 15,
+ "GetISteamNetworking": 16,
+ "GetISteamRemoteStorage": 17,
+ "GetISteamScreenshots": 18,
+ "GetISteamGameSearch": 19,
+ "RunFrame": 20,
+ "GetIPCCallCount": 21,
+ "SetWarningMessageHook": 22,
+ "BShutdownIfAllPipesClosed": 23,
+ "GetISteamHTTP": 24,
+ "DEPRECATED_GetISteamUnifiedMessages": 25,
+ "GetISteamController": 26,
+ "GetISteamUGC": 27,
+ "GetISteamAppList": 28,
+ "GetISteamMusic": 29,
+ "GetISteamMusicRemote": 30,
+ "GetISteamHTMLSurface": 31,
+ "DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess": 32,
+ "DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess": 33,
+ "Set_SteamAPI_CCheckCallbackRegisteredInProcess": 34,
+ "GetISteamInventory": 35,
+ "GetISteamVideo": 36,
+ "GetISteamParentalSettings": 37,
+ "GetISteamInput": 38,
+ "GetISteamParties": 39
+ },
"SteamController007": {
"Init": 0,
"Shutdown": 1,
@@ -3464,48 +3506,6 @@
"GetProfileItemPropertyString": 78,
"GetProfileItemPropertyUint": 79
},
- "SteamClient018": {
- "CreateSteamPipe": 0,
- "BReleaseSteamPipe": 1,
- "ConnectToGlobalUser": 2,
- "CreateLocalUser": 3,
- "ReleaseUser": 4,
- "GetISteamUser": 5,
- "GetISteamGameServer": 6,
- "SetLocalIPBinding": 7,
- "GetISteamFriends": 8,
- "GetISteamUtils": 9,
- "GetISteamMatchmaking": 10,
- "GetISteamMatchmakingServers": 11,
- "GetISteamGenericInterface": 12,
- "GetISteamUserStats": 13,
- "GetISteamGameServerStats": 14,
- "GetISteamApps": 15,
- "GetISteamNetworking": 16,
- "GetISteamRemoteStorage": 17,
- "GetISteamScreenshots": 18,
- "GetISteamGameSearch": 19,
- "RunFrame": 20,
- "GetIPCCallCount": 21,
- "SetWarningMessageHook": 22,
- "BShutdownIfAllPipesClosed": 23,
- "GetISteamHTTP": 24,
- "DEPRECATED_GetISteamUnifiedMessages": 25,
- "GetISteamController": 26,
- "GetISteamUGC": 27,
- "GetISteamAppList": 28,
- "GetISteamMusic": 29,
- "GetISteamMusicRemote": 30,
- "GetISteamHTMLSurface": 31,
- "DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess": 32,
- "DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess": 33,
- "Set_SteamAPI_CCheckCallbackRegisteredInProcess": 34,
- "GetISteamInventory": 35,
- "GetISteamVideo": 36,
- "GetISteamParentalSettings": 37,
- "GetISteamInput": 38,
- "GetISteamParties": 39
- },
"STEAMHTTP_INTERFACE_VERSION003": {
"CreateHTTPRequest": 0,
"SetHTTPRequestContextValue": 1,
@@ -3756,6 +3756,29 @@
"GetAppDependencies": 74,
"DeleteItem": 75
},
+ "SteamNetworkingUtils001": {
+ "GetLocalTimestamp": 0,
+ "SetDebugOutputFunction": 1,
+ "SetConfigValue": 2,
+ "GetConfigValue": 3,
+ "GetConfigValueInfo": 4,
+ "GetFirstConfigValue": 5,
+ "SteamNetworkingIPAddr_ToString": 6,
+ "SteamNetworkingIPAddr_ParseString": 7,
+ "SteamNetworkingIdentity_ToString": 8,
+ "SteamNetworkingIdentity_ParseString": 9,
+ "GetLocalPingLocation": 10,
+ "EstimatePingTimeBetweenTwoLocations": 11,
+ "EstimatePingTimeFromLocalHost": 12,
+ "ConvertPingLocationToString": 13,
+ "ParsePingLocationString": 14,
+ "CheckPingDataUpToDate": 15,
+ "IsPingMeasurementInProgress": 16,
+ "GetPingToDataCenter": 17,
+ "GetDirectPingToPOP": 18,
+ "GetPOPCount": 19,
+ "GetPOPList": 20
+ },
"SteamNetworkingSockets002": {
"CreateListenSocketIP": 0,
"ConnectByIPAddress": 1,
@@ -3787,7 +3810,7 @@
"CreateHostedDedicatedServerListenSocket": 27,
"RunCallbacks": 28
},
- "SteamNetworkingUtils001": {
+ "SteamNetworkingUtils002": {
"GetLocalTimestamp": 0,
"SetDebugOutputFunction": 1,
"SetConfigValue": 2,
@@ -3798,13 +3821,13 @@
"SteamNetworkingIPAddr_ParseString": 7,
"SteamNetworkingIdentity_ToString": 8,
"SteamNetworkingIdentity_ParseString": 9,
- "GetLocalPingLocation": 10,
- "EstimatePingTimeBetweenTwoLocations": 11,
- "EstimatePingTimeFromLocalHost": 12,
- "ConvertPingLocationToString": 13,
- "ParsePingLocationString": 14,
- "CheckPingDataUpToDate": 15,
- "IsPingMeasurementInProgress": 16,
+ "GetRelayNetworkStatus": 10,
+ "GetLocalPingLocation": 11,
+ "EstimatePingTimeBetweenTwoLocations": 12,
+ "EstimatePingTimeFromLocalHost": 13,
+ "ConvertPingLocationToString": 14,
+ "ParsePingLocationString": 15,
+ "CheckPingDataUpToDate": 16,
"GetPingToDataCenter": 17,
"GetDirectPingToPOP": 18,
"GetPOPCount": 19,
@@ -3846,29 +3869,6 @@
"GetGameCoordinatorServerLogin": 32,
"RunCallbacks": 33
},
- "SteamNetworkingUtils002": {
- "GetLocalTimestamp": 0,
- "SetDebugOutputFunction": 1,
- "SetConfigValue": 2,
- "GetConfigValue": 3,
- "GetConfigValueInfo": 4,
- "GetFirstConfigValue": 5,
- "SteamNetworkingIPAddr_ToString": 6,
- "SteamNetworkingIPAddr_ParseString": 7,
- "SteamNetworkingIdentity_ToString": 8,
- "SteamNetworkingIdentity_ParseString": 9,
- "GetRelayNetworkStatus": 10,
- "GetLocalPingLocation": 11,
- "EstimatePingTimeBetweenTwoLocations": 12,
- "EstimatePingTimeFromLocalHost": 13,
- "ConvertPingLocationToString": 14,
- "ParsePingLocationString": 15,
- "CheckPingDataUpToDate": 16,
- "GetPingToDataCenter": 17,
- "GetDirectPingToPOP": 18,
- "GetPOPCount": 19,
- "GetPOPList": 20
- },
"STEAMUGC_INTERFACE_VERSION013": {
"CreateQueryUserUGCRequest": 0,
"CreateQueryAllUGCRequest": 2,
@@ -3990,6 +3990,15 @@
"GetISteamParties": 39,
"GetISteamRemotePlay": 40
},
+ "STEAMREMOTEPLAY_INTERFACE_VERSION001": {
+ "GetSessionCount": 0,
+ "GetSessionID": 1,
+ "GetSessionSteamID": 2,
+ "GetSessionClientName": 3,
+ "GetSessionClientFormFactor": 4,
+ "BGetSessionClientResolution": 5,
+ "BSendRemotePlayTogetherInvite": 6
+ },
"SteamNetworkingSockets004": {
"CreateListenSocketIP": 0,
"ConnectByIPAddress": 1,
@@ -4026,15 +4035,6 @@
"GetGameCoordinatorServerLogin": 32,
"RunCallbacks": 33
},
- "STEAMREMOTEPLAY_INTERFACE_VERSION001": {
- "GetSessionCount": 0,
- "GetSessionID": 1,
- "GetSessionSteamID": 2,
- "GetSessionClientName": 3,
- "GetSessionClientFormFactor": 4,
- "BGetSessionClientResolution": 5,
- "BSendRemotePlayTogetherInvite": 6
- },
"SteamClient020": {
"CreateSteamPipe": 0,
"BReleaseSteamPipe": 1,
@@ -4334,6 +4334,7 @@
"GetLobbyOwner": 35,
"SetLobbyOwner": 36,
"SetLinkedLobby": 37,
+ "CheckForPSNGameBootInvite": 38,
"ServerResponded": 0,
"ServerFailedToRespond": 1,
"RefreshComplete": 2,
@@ -5634,198 +5635,5 @@
"GetGlobalStat": 39,
"GetGlobalStatHistory": 41,
"GetAchievementProgressLimits": 43
- },
- "SteamFriends018": {
- "GetPersonaName": 0,
- "GetPersonaState": 1,
- "GetFriendCount": 2,
- "GetFriendByIndex": 3,
- "GetFriendRelationship": 4,
- "GetFriendPersonaState": 5,
- "GetFriendPersonaName": 6,
- "GetFriendGamePlayed": 7,
- "GetFriendPersonaNameHistory": 8,
- "GetFriendSteamLevel": 9,
- "GetPlayerNickname": 10,
- "GetFriendsGroupCount": 11,
- "GetFriendsGroupIDByIndex": 12,
- "GetFriendsGroupName": 13,
- "GetFriendsGroupMembersCount": 14,
- "GetFriendsGroupMembersList": 15,
- "HasFriend": 16,
- "GetClanCount": 17,
- "GetClanByIndex": 18,
- "GetClanName": 19,
- "GetClanTag": 20,
- "GetClanActivityCounts": 21,
- "DownloadClanActivityCounts": 22,
- "GetFriendCountFromSource": 23,
- "GetFriendFromSourceByIndex": 24,
- "IsUserInSource": 25,
- "SetInGameVoiceSpeaking": 26,
- "ActivateGameOverlay": 27,
- "ActivateGameOverlayToUser": 28,
- "ActivateGameOverlayToWebPage": 29,
- "ActivateGameOverlayToStore": 30,
- "SetPlayedWith": 31,
- "ActivateGameOverlayInviteDialog": 32,
- "GetSmallFriendAvatar": 33,
- "GetMediumFriendAvatar": 34,
- "GetLargeFriendAvatar": 35,
- "RequestUserInformation": 36,
- "RequestClanOfficerList": 37,
- "GetClanOwner": 38,
- "GetClanOfficerCount": 39,
- "GetClanOfficerByIndex": 40,
- "SetRichPresence": 41,
- "ClearRichPresence": 42,
- "GetFriendRichPresence": 43,
- "GetFriendRichPresenceKeyCount": 44,
- "GetFriendRichPresenceKeyByIndex": 45,
- "RequestFriendRichPresence": 46,
- "InviteUserToGame": 47,
- "GetCoplayFriendCount": 48,
- "GetCoplayFriend": 49,
- "GetFriendCoplayTime": 50,
- "GetFriendCoplayGame": 51,
- "JoinClanChatRoom": 52,
- "LeaveClanChatRoom": 53,
- "GetClanChatMemberCount": 54,
- "GetChatMemberByIndex": 55,
- "SendClanChatMessage": 56,
- "GetClanChatMessage": 57,
- "IsClanChatAdmin": 58,
- "IsClanChatWindowOpenInSteam": 59,
- "OpenClanChatWindowInSteam": 60,
- "CloseClanChatWindowInSteam": 61,
- "SetListenForFriendsMessages": 62,
- "ReplyToFriendMessage": 63,
- "GetFriendMessage": 64,
- "GetFollowerCount": 65,
- "IsFollowing": 66,
- "EnumerateFollowingList": 67,
- "IsClanPublic": 68,
- "IsClanOfficialGameGroup": 69,
- "GetNumChatsWithUnreadPriorityMessages": 70,
- "ActivateGameOverlayRemotePlayTogetherInviteDialog": 71,
- "RegisterProtocolInOverlayBrowser": 72,
- "ActivateGameOverlayInviteDialogConnectString": 73,
- "RequestEquippedProfileItems": 74,
- "BHasEquippedProfileItem": 75,
- "GetProfileItemPropertyString": 76,
- "GetProfileItemPropertyUint": 77
- },
- "STEAMREMOTEPLAY_INTERFACE_VERSION003": {
- "GetSessionCount": 0,
- "GetSessionID": 1,
- "GetSessionSteamID": 2,
- "GetSessionClientName": 3,
- "GetSessionClientFormFactor": 4,
- "BGetSessionClientResolution": 5,
- "ShowRemotePlayTogetherUI": 6,
- "BSendRemotePlayTogetherInvite": 7,
- "BEnableRemotePlayTogetherDirectInput": 8,
- "DisableRemotePlayTogetherDirectInput": 9,
- "GetInput": 10,
- "SetMouseVisibility": 11,
- "SetMousePosition": 12,
- "CreateMouseCursor": 13,
- "SetMouseCursor": 14
- },
- "STEAMUGC_INTERFACE_VERSION021": {
- "CreateQueryUserUGCRequest": 0,
- "CreateQueryAllUGCRequest": 2,
- "CreateQueryUGCDetailsRequest": 3,
- "SendQueryUGCRequest": 4,
- "GetQueryUGCResult": 5,
- "GetQueryUGCNumTags": 6,
- "GetQueryUGCTag": 7,
- "GetQueryUGCTagDisplayName": 8,
- "GetQueryUGCPreviewURL": 9,
- "GetQueryUGCMetadata": 10,
- "GetQueryUGCChildren": 11,
- "GetQueryUGCStatistic": 12,
- "GetQueryUGCNumAdditionalPreviews": 13,
- "GetQueryUGCAdditionalPreview": 14,
- "GetQueryUGCNumKeyValueTags": 15,
- "GetQueryUGCKeyValueTag": 17,
- "GetNumSupportedGameVersions": 18,
- "GetSupportedGameVersionData": 19,
- "GetQueryUGCContentDescriptors": 20,
- "ReleaseQueryUGCRequest": 21,
- "AddRequiredTag": 22,
- "AddRequiredTagGroup": 23,
- "AddExcludedTag": 24,
- "SetReturnOnlyIDs": 25,
- "SetReturnKeyValueTags": 26,
- "SetReturnLongDescription": 27,
- "SetReturnMetadata": 28,
- "SetReturnChildren": 29,
- "SetReturnAdditionalPreviews": 30,
- "SetReturnTotalOnly": 31,
- "SetReturnPlaytimeStats": 32,
- "SetLanguage": 33,
- "SetAllowCachedResponse": 34,
- "SetAdminQuery": 35,
- "SetCloudFileNameFilter": 36,
- "SetMatchAnyTag": 37,
- "SetSearchText": 38,
- "SetRankedByTrendDays": 39,
- "SetTimeCreatedDateRange": 40,
- "SetTimeUpdatedDateRange": 41,
- "AddRequiredKeyValueTag": 42,
- "RequestUGCDetails": 43,
- "CreateItem": 44,
- "StartItemUpdate": 45,
- "SetItemTitle": 46,
- "SetItemDescription": 47,
- "SetItemUpdateLanguage": 48,
- "SetItemMetadata": 49,
- "SetItemVisibility": 50,
- "SetItemTags": 51,
- "SetItemContent": 52,
- "SetItemPreview": 53,
- "SetAllowLegacyUpload": 54,
- "RemoveAllItemKeyValueTags": 55,
- "RemoveItemKeyValueTags": 56,
- "AddItemKeyValueTag": 57,
- "AddItemPreviewFile": 58,
- "AddItemPreviewVideo": 59,
- "UpdateItemPreviewFile": 60,
- "UpdateItemPreviewVideo": 61,
- "RemoveItemPreview": 62,
- "AddContentDescriptor": 63,
- "RemoveContentDescriptor": 64,
- "SetRequiredGameVersions": 65,
- "SubmitItemUpdate": 66,
- "GetItemUpdateProgress": 67,
- "SetUserItemVote": 68,
- "GetUserItemVote": 69,
- "AddItemToFavorites": 70,
- "RemoveItemFromFavorites": 71,
- "SubscribeItem": 72,
- "UnsubscribeItem": 73,
- "GetNumSubscribedItems": 74,
- "GetSubscribedItems": 75,
- "GetItemState": 76,
- "GetItemInstallInfo": 77,
- "GetItemDownloadInfo": 78,
- "DownloadItem": 79,
- "BInitWorkshopForGameServer": 80,
- "SuspendDownloads": 81,
- "StartPlaytimeTracking": 82,
- "StopPlaytimeTracking": 83,
- "StopPlaytimeTrackingForAllItems": 84,
- "AddDependency": 85,
- "RemoveDependency": 86,
- "AddAppDependency": 87,
- "RemoveAppDependency": 88,
- "GetAppDependencies": 89,
- "DeleteItem": 90,
- "ShowWorkshopEULA": 91,
- "GetWorkshopEULAStatus": 92,
- "GetUserContentDescriptorPreferences": 93,
- "SetItemsDisabledLocally": 94,
- "SetSubscriptionsLoadOrder": 95
}
}
\ No newline at end of file
diff --git a/src/smoke_api/smoke_api.cpp b/src/smoke_api/smoke_api.cpp
index c9b4a83..24da4a2 100644
--- a/src/smoke_api/smoke_api.cpp
+++ b/src/smoke_api/smoke_api.cpp
@@ -2,12 +2,11 @@
#include
#include
-#include
+#include
#include
#include
-#include
#include
-#include
+#include
#include
#include
#include
@@ -41,17 +40,16 @@
namespace {
namespace kb = koalabox;
- void* steamapi_handle = nullptr;
- const kb::dll_monitor::callback_context_t* dll_monitor_context = nullptr;
+ void* original_steamapi_handle = nullptr;
- std::set find_steamclient_versions() {
+ std::set find_steamclient_versions(void* steamapi_handle) {
if(!steamapi_handle) {
kb::util::panic("Invalid state. steamapi_handle is null.");
}
std::set versions;
- const auto rdata_section = kb::module::get_section_or_throw(steamapi_handle, kb::module::CONST_STR_SECTION);
+ const auto rdata_section = kb::lib::get_section_or_throw(steamapi_handle, kb::lib::CONST_STR_SECTION);
const auto rdata = rdata_section.to_string();
const std::regex pattern(R"(SteamClient\d{3})");
@@ -65,26 +63,36 @@ namespace {
return versions;
}
- bool on_steamclient_loaded(const HMODULE steamclient_handle) {
+ void warn_if_late_injection(const std::string& steamclient_version) {
+#ifdef KB_WIN
+ if(kb::util::is_wine_env()) {
+ return;
+ }
+
+ LOG_WARN(
+ "'{}' was already initialized. SmokeAPI might not work as expected.", steamclient_version
+ );
+ LOG_WARN(
+ "Probable cause: SmokeAPI was injected too late. If possible, try injecting it earlier."
+ );
+ LOG_WARN("NOTE: You can safely ignore this warning if running under Proton or native Linux");
+#endif
+ }
+
+ bool on_steamclient_loaded(void* steamclient_handle) {
static const auto CreateInterface$ = KB_MOD_GET_FUNC(steamclient_handle, CreateInterface);
+ auto* steamapi_handle = original_steamapi_handle
+ ? original_steamapi_handle
+ : kb::lib::get_library_handle(STEAM_API_MODULE);
if(steamapi_handle) {
// SteamAPI might have been initialized.
// Hence, we need to query SteamClient interfaces and hook them if needed.
- const auto steamclient_versions = find_steamclient_versions();
+ const auto steamclient_versions = find_steamclient_versions(steamapi_handle);
for(const auto& steamclient_version : steamclient_versions) {
if(CreateInterface$(steamclient_version.c_str(), nullptr)) {
-#ifdef KB_WIN
- if(!kb::util::is_wine_env()) {
- LOG_WARN(
- "'{}' was already initialized. SmokeAPI might not work as expected.", steamclient_version
- );
- LOG_WARN(
- "Probable cause: SmokeAPI was injected too late. If possible, try injecting it earlier."
- );
- LOG_WARN("NOTE: You can safely ignore this warning if running under Proton or native Linux");
- }
-#endif
+ warn_if_late_injection(steamclient_version);
+
steam_interfaces::hook_steamclient_interface(steamclient_handle, steamclient_version);
} else {
LOG_INFO("'{}' has not been initialized. Waiting for initialization.", steamclient_version);
@@ -94,16 +102,11 @@ namespace {
KB_HOOK_DETOUR_MODULE(CreateInterface, steamclient_handle);
- // TODO: There is an implicit lifetime dependency here and potential for leaks.
- // This mechanism requires rework.
- // DLL monitor will have destroyed it.
- dll_monitor_context = nullptr;
-
return true;
}
- void start_dll_listener() {
- dll_monitor_context = kb::dll_monitor::init_listener(
+ void init_lib_monitor() {
+ kb::lib_monitor::init_listener(
{{STEAMCLIENT_DLL, on_steamclient_loaded}}
);
}
@@ -123,7 +126,7 @@ namespace smoke_api {
LOG_INFO("{} v{} | Built at '{}'", PROJECT_NAME, PROJECT_VERSION, __TIMESTAMP__);
LOG_DEBUG("Parsed config:\n{}", nlohmann::ordered_json(config::instance).dump(2));
- const auto exe_path = kb::module::get_fs_path(nullptr);
+ const auto exe_path = kb::lib::get_fs_path(nullptr);
const auto exe_name = kb::path::to_str(exe_path.filename());
LOG_DEBUG("Process name: '{}' [{}-bit]", exe_name, kb::util::BITNESS);
@@ -135,14 +138,14 @@ namespace smoke_api {
if(kb::hook::is_hook_mode(module_handle, STEAM_API_MODULE)) {
LOG_INFO("Detected hook mode");
- start_dll_listener();
+ init_lib_monitor();
} else {
LOG_INFO("Detected proxy mode");
- start_dll_listener();
+ init_lib_monitor();
const auto self_path = kb::paths::get_self_dir();
- steamapi_handle = kb::loader::load_original_library(
+ original_steamapi_handle = kb::lib::load_original_library(
self_path,
STEAM_API_MODULE
);
@@ -156,12 +159,14 @@ namespace smoke_api {
void shutdown() {
try {
- if(steamapi_handle != nullptr) {
- kb::module::unload_library(steamapi_handle);
- steamapi_handle = nullptr;
+ if(original_steamapi_handle != nullptr) {
+ kb::lib::unload_library(original_steamapi_handle);
+ original_steamapi_handle = nullptr;
}
- kb::dll_monitor::shutdown_listener(dll_monitor_context);
+ if(kb::lib_monitor::is_initialized()) {
+ kb::lib_monitor::shutdown_listener();
+ }
// TODO: Unhook everything
diff --git a/src/steam_api/steam_client.cpp b/src/steam_api/steam_client.cpp
index 19bea30..67c181e 100644
--- a/src/steam_api/steam_client.cpp
+++ b/src/steam_api/steam_client.cpp
@@ -6,15 +6,17 @@
namespace steam_client {
void* GetGenericInterface(
const std::string& function_name,
- const std::string& interface_version,
+ const char* interface_version, // This can be null
const std::function& original_function
) noexcept {
try {
auto* const interface = original_function();
- LOG_DEBUG("{} -> '{}' @ {}", function_name, interface_version, interface);
+ if(interface_version) {
+ LOG_DEBUG("{} -> '{}' @ {}", function_name, interface_version, interface);
- steam_interfaces::hook_virtuals(interface, interface_version);
+ steam_interfaces::hook_virtuals(interface, interface_version);
+ }
return interface;
} catch(const std::exception& e) {
diff --git a/src/steam_api/steam_client.hpp b/src/steam_api/steam_client.hpp
index 61026f6..d33f987 100644
--- a/src/steam_api/steam_client.hpp
+++ b/src/steam_api/steam_client.hpp
@@ -5,7 +5,7 @@
namespace steam_client {
void* GetGenericInterface(
const std::string& function_name,
- const std::string& interface_version,
+ const char* interface_version,
const std::function& original_function
) noexcept;
}
diff --git a/src/steam_api/steam_interfaces.cpp b/src/steam_api/steam_interfaces.cpp
index b4c5de6..a7d95d5 100644
--- a/src/steam_api/steam_interfaces.cpp
+++ b/src/steam_api/steam_interfaces.cpp
@@ -7,7 +7,7 @@
#include "steam_api/steam_interfaces.hpp"
-#include "koalabox/module.hpp"
+#include "koalabox/lib.hpp"
#include "smoke_api/smoke_api.hpp"
#include "smoke_api/steamclient/steamclient.hpp"
#include "virtuals/steam_api_virtuals.hpp"
@@ -196,7 +196,7 @@ namespace steam_interfaces {
}
void hook_steamclient_interface(
- const HMODULE steamclient_handle,
+ void* steamclient_handle,
const std::string& steam_client_interface_version
) noexcept {
try {
@@ -209,7 +209,6 @@ namespace steam_interfaces {
// Map virtual hook map to a set of keys
const auto prefixes = std::views::keys(virtual_hook_map) | std::ranges::to();
-
const auto CreateInterface$ = KB_MOD_GET_FUNC(steamclient_handle, CreateInterface);
const auto* const THIS = CreateInterface$(steam_client_interface_version.c_str(), nullptr);
hook_virtuals(THIS, steam_client_interface_version);
diff --git a/src/steam_api/steam_interfaces.hpp b/src/steam_api/steam_interfaces.hpp
index d1a9dde..6fa5ebc 100644
--- a/src/steam_api/steam_interfaces.hpp
+++ b/src/steam_api/steam_interfaces.hpp
@@ -12,7 +12,7 @@ namespace steam_interfaces {
* such as in the case of late injection.
*/
void hook_steamclient_interface(
- HMODULE steamclient_handle,
+ void* steamclient_handle,
const std::string& steam_client_interface_version
) noexcept;
}
diff --git a/static/smoke_api/types.hpp b/static/smoke_api/types.hpp
index 941074b..f6f56f1 100644
--- a/static/smoke_api/types.hpp
+++ b/static/smoke_api/types.hpp
@@ -1,11 +1,8 @@
#pragma once
-#include
-#include