From c7ce32dad1a8c2cb3501f4a7786c67d8cd8ada77 Mon Sep 17 00:00:00 2001 From: a Date: Fri, 6 Dec 2024 23:15:07 +0200 Subject: [PATCH] fix implementation of `Steam_UGC::GetItemState()` --- dll/steam_ugc.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/dll/steam_ugc.cpp b/dll/steam_ugc.cpp index ea0bf7d1..b8ae61d6 100644 --- a/dll/steam_ugc.cpp +++ b/dll/steam_ugc.cpp @@ -1350,18 +1350,20 @@ uint32 Steam_UGC::GetItemState( PublishedFileId_t nPublishedFileID ) { PRINT_DEBUG("%llu", nPublishedFileID); std::lock_guard lock(global_mutex); - if (ugc_bridge->has_subbed_mod(nPublishedFileID)) { - if (settings->isModInstalled(nPublishedFileID)) { - PRINT_DEBUG(" mod is subscribed and installed"); - return k_EItemStateInstalled | k_EItemStateSubscribed; - } - - PRINT_DEBUG(" mod is subscribed"); - return k_EItemStateSubscribed; + + if (!settings->isModInstalled(nPublishedFileID)) { + PRINT_DEBUG(" mod isn't found"); + return k_EItemStateNone; } - PRINT_DEBUG(" mod isn't found"); - return k_EItemStateNone; + if (ugc_bridge->has_subbed_mod(nPublishedFileID)) { + PRINT_DEBUG(" mod is subscribed and installed"); + return k_EItemStateInstalled | k_EItemStateSubscribed; + } + + + PRINT_DEBUG(" mod is not subscribed"); + return k_EItemStateDisabledLocally; }