From e2845363e91eb394a6aa3ef56b5b2cc447abc7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 12 Jan 2020 18:41:46 +0100 Subject: [PATCH] Async I/O: Don't delay on close. Fixes #12549 (MGS:PW crash). Also sneak in a small change in logging. --- Core/ELF/PBPReader.cpp | 2 +- Core/HLE/sceIo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/ELF/PBPReader.cpp b/Core/ELF/PBPReader.cpp index 76fdbb36e4ae..41653bfcba26 100644 --- a/Core/ELF/PBPReader.cpp +++ b/Core/ELF/PBPReader.cpp @@ -37,7 +37,7 @@ PBPReader::PBPReader(FileLoader *fileLoader) : file_(nullptr), header_(), isELF_ } if (memcmp(header_.magic, "\0PBP", 4) != 0) { if (memcmp(header_.magic, "\nFLE", 4) != 0) { - DEBUG_LOG(LOADER, "%s: File actually an ELF, not a PBP", fileLoader->Path().c_str()); + VERBOSE_LOG(LOADER, "%s: File actually an ELF, not a PBP", fileLoader->Path().c_str()); isELF_ = true; } else { ERROR_LOG(LOADER, "Magic number in %s indicated no PBP: %s", fileLoader->Path().c_str(), header_.magic); diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index e0378732c4d5..7f2ea0afa9c7 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -2719,8 +2719,8 @@ static int IoAsyncFinish(int id) { case IoAsyncOp::CLOSE: f->asyncResult = 0; - // TODO: Rough estimate. - us = 100; + // CLOSE shouldn't have a delay. See #12549. + us = 0; DEBUG_LOG(SCEIO, "ASYNC %lli = sceIoCloseAsync(%d)", f->asyncResult, id); break;