From 1bdd540498658180f05ff61533da14f500564c91 Mon Sep 17 00:00:00 2001 From: Detanup01 <91248446+Detanup01@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:36:32 +0100 Subject: [PATCH] Update steam_remote_storage.h Added better version if this. Now support from reading mods and using the mods file --- dll/dll/steam_remote_storage.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dll/dll/steam_remote_storage.h b/dll/dll/steam_remote_storage.h index 032bc5fa..7b6a141c 100644 --- a/dll/dll/steam_remote_storage.h +++ b/dll/dll/steam_remote_storage.h @@ -655,12 +655,24 @@ SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex ) { PRINT_DEBUG("Steam_Remote_Storage::EnumerateUserSubscribedFiles\n"); std::lock_guard lock(global_mutex); + // Get ready for a working but bad implementation - Detanup01 RemoteStorageEnumerateUserSubscribedFilesResult_t data; data.m_eResult = k_EResultOK; - data.m_nResultsReturned = 0; - data.m_nTotalResultCount = 0; - //data.m_rgPublishedFileId; - //data.m_rgRTimeSubscribed; + auto mods = settings->modSet(); + uint32_t modCount = mods.size(); + data.m_nResultsReturned = modCount; + data.m_nTotalResultCount = modCount; + data.m_rgPublishedFileId; + data.m_rgRTimeSubscribed; + uint32_t iterated = 0; + for (std::set::iterator i = mods.begin(); i != mods.end(); i++) { + PublishedFileId_t modId = *i; + auto mod = settings->getMod(modId); + uint32 time = mod.timeAddedToUserList; //this can be changed, default is 1554997000 + data.m_rgPublishedFileId[iterated] = modId; + data.m_rgRTimeSubscribed[iterated] = time; + iterated++; + } return callback_results->addCallResult(data.k_iCallback, &data, sizeof(data)); }