Only OpenAsync works with dispatch disabled.

And it even re-enables dispatch.
This commit is contained in:
Unknown W. Brackets 2013-04-06 13:05:29 -07:00
parent 2367c17735
commit f380075e2a

View File

@ -731,6 +731,9 @@ FileNode *__IoOpen(const char* filename, int flags, int mode) {
}
u32 sceIoOpen(const char* filename, int flags, int mode) {
if (!__KernelIsDispatchEnabled())
return -1;
FileNode *f = __IoOpen(filename, flags, mode);
if (f == NULL) {
ERROR_LOG(HLE, "ERROR_ERRNO_FILE_NOT_FOUND=sceIoOpen(%s, %08x, %08x) - file not found", filename, flags, mode);
@ -1119,6 +1122,11 @@ u32 sceIoSetAsyncCallback(int id, u32 clbckId, u32 clbckArg)
u32 sceIoOpenAsync(const char *filename, int flags, int mode)
{
// TOOD: Use an internal method so as not to pollute the log?
// Intentionally does not work when interrupts disabled.
if (!__KernelIsDispatchEnabled())
sceKernelResumeDispatchThread(1);
FileNode *f = __IoOpen(filename, flags, mode);
SceUID fd;