Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix soft-lock when loading non-existing files, fix wrong timer in MIPSDebugInterface #18950

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Core/MIPS/MIPSDebugInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
11 changes: 5 additions & 6 deletions UI/GameInfoCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::mutex> lock(info_->lock);
info_->MarkReadyNoLock(flags_);
ERROR_LOG(LOADER, "Failed getting game info.");
return;
}

Expand Down
Loading