1
0
Fork 0
mirror of https://github.com/Detanup01/gbe_fork.git synced 2025-08-11 01:45:34 +02:00

Merge branch 'Detanup01:dev' into dev

This commit is contained in:
alex47exe 2024-11-05 02:10:20 +00:00 committed by GitHub
commit 6c59179286
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 4 deletions

View file

@ -30,7 +30,7 @@ This project depends on many third-party libraries and tools, credits to them fo
--- ---
# How to use the emu # How to use the emu
* **Always generate the interfaces file using the `find_interfaces` tool.** * **Always generate the interfaces file using the `generate_interfaces` tool.**
* **Generate the proper app configuration using the `generate_emu_config` tool.** * **Generate the proper app configuration using the `generate_emu_config` tool.**
* **If things don't work, try the `ColdClientLoader` setup.** * **If things don't work, try the `ColdClientLoader` setup.**

View file

@ -294,11 +294,24 @@ SteamAPICall_t Steam_UGC::SendQueryUGCRequest( UGCQueryHandle_t handle )
{ {
PRINT_DEBUG("%llu", handle); PRINT_DEBUG("%llu", handle);
std::lock_guard<std::recursive_mutex> lock(global_mutex); std::lock_guard<std::recursive_mutex> lock(global_mutex);
if (handle == k_UGCQueryHandleInvalid) return k_uAPICallInvalid;
const auto trigger_failure = [handle, this](){
SteamUGCQueryCompleted_t data{};
data.m_handle = handle;
data.m_eResult = k_EResultFail;
data.m_unNumResultsReturned = 0;
data.m_unTotalMatchingResults = 0;
data.m_bCachedData = false;
auto ret = callback_results->addCallResult(data.k_iCallback, &data, sizeof(data));
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
return ret;
};
if (handle == k_UGCQueryHandleInvalid) return trigger_failure();
auto request = std::find_if(ugc_queries.begin(), ugc_queries.end(), [&handle](struct UGC_query const& item) { return item.handle == handle; }); auto request = std::find_if(ugc_queries.begin(), ugc_queries.end(), [&handle](struct UGC_query const& item) { return item.handle == handle; });
if (ugc_queries.end() == request) if (ugc_queries.end() == request) return trigger_failure();
return k_uAPICallInvalid;
if (request->return_all_subscribed) { if (request->return_all_subscribed) {
request->results = std::set<PublishedFileId_t>(ugc_bridge->subbed_mods_itr_begin(), ugc_bridge->subbed_mods_itr_end()); request->results = std::set<PublishedFileId_t>(ugc_bridge->subbed_mods_itr_begin(), ugc_bridge->subbed_mods_itr_end());