From 22c943731992a8e4be5cbe7fb56e3e82d0a5ce86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 26 Mar 2024 13:40:25 +0100 Subject: [PATCH 1/2] Fix wrong timer reading in MIPSDebugInterface, thanks Nemoumbra --- Core/MIPS/MIPSDebugInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/MIPS/MIPSDebugInterface.cpp b/Core/MIPS/MIPSDebugInterface.cpp index b598e0fe676c..25bbe5af59e7 100644 --- a/Core/MIPS/MIPSDebugInterface.cpp +++ b/Core/MIPS/MIPSDebugInterface.cpp @@ -159,7 +159,7 @@ class MipsExpressionFunctions: public IExpressionFunctions return __KernelGetCurThreadModuleId(); if (referenceIndex == REF_INDEX_USEC) return (uint32_t)CoreTiming::GetGlobalTimeUs(); // Loses information - if (referenceIndex == REF_INDEX_USEC) + if (referenceIndex == REF_INDEX_TICKS) return (uint32_t)CoreTiming::GetTicks(); if ((referenceIndex & ~(REF_INDEX_FPU | REF_INDEX_FPU_INT)) < 32) return cpu->GetRegValue(1, referenceIndex & ~(REF_INDEX_FPU | REF_INDEX_FPU_INT)); From 3424d2460542ecf7f6868052e93ebbb48c6d082a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 26 Mar 2024 15:10:06 +0100 Subject: [PATCH 2/2] Fix hang when trying to load non-existing file or folder. --- UI/GameInfoCache.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 876794f79ac1..7998a3343ad2 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -451,12 +451,11 @@ class GameInfoWorkItem : public Task { void Run() override { // An early-return will result in the destructor running, where we can set // flags like working and pending. - if (!info_->CreateLoader()) { - return; - } - - // In case of a remote file, check if it actually exists before locking. - if (!info_->GetFileLoader() || !info_->GetFileLoader()->Exists()) { + if (!info_->CreateLoader() || !info_->GetFileLoader() || !info_->GetFileLoader()->Exists()) { + // Mark everything requested as done, so + std::unique_lock lock(info_->lock); + info_->MarkReadyNoLock(flags_); + ERROR_LOG(LOADER, "Failed getting game info."); return; }