Skip to content

Commit

Permalink
Async I/O: Don't delay on close. Fixes #12549 (MGS:PW crash).
Browse files Browse the repository at this point in the history
Also sneak in a small change in logging.
  • Loading branch information
hrydgard committed Jan 12, 2020
1 parent a881d78 commit e284536
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Core/ELF/PBPReader.cpp
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions Core/HLE/sceIo.cpp
Expand Up @@ -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;

Expand Down

0 comments on commit e284536

Please sign in to comment.