From d247a7def6ba7ee184d975972e6b3b9280a6483a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 12 Apr 2014 13:21:35 -0700 Subject: [PATCH] Don't reschedule when writing to stdout. Let's still capture the output, though. --- Core/HLE/sceIo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index fdf7075460..319383942b 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -933,6 +933,11 @@ u32 sceIoWrite(int id, u32 data_addr, int size) { } else if (result >= 0) { DEBUG_LOG(SCEIO, "%x=sceIoWrite(%d, %08x, %x)", result, id, data_addr, size); if (__KernelIsDispatchEnabled()) { + // If we wrote to stdout, return an error (even though we did log it) rather than delaying. + // On actual hardware, it would just return this... we just want the log output. + if (__IsInInterrupt()) { + return SCE_KERNEL_ERROR_ILLEGAL_CONTEXT; + } return hleDelayResult(result, "io write", us); } else { return result;