From 88b686c27d0d587a5787007292f863143b05e8f8 Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 6 Apr 2022 19:48:52 +1200 Subject: [PATCH] Clear FILE_NO_INTERMEDIATE_BUFFERING in IoCreateFile Fixes JSRF issue with loading titles from Windows Storage Spaces --- src/core/kernel/exports/EmuKrnlIo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/kernel/exports/EmuKrnlIo.cpp b/src/core/kernel/exports/EmuKrnlIo.cpp index fcd3c6f66..3b369aafd 100644 --- a/src/core/kernel/exports/EmuKrnlIo.cpp +++ b/src/core/kernel/exports/EmuKrnlIo.cpp @@ -265,6 +265,11 @@ XBSYSAPI EXPORTNUM(66) xbox::ntstatus_xt NTAPI xbox::IoCreateFile DesiredAccess |= SYNCHRONIZE; } + // Titles can make assumptions about where files are located, but cxbxr can't for end users + // Prevent issues with files stored on Windows Storage Spaces (and possibly other "exotic" places) + // Test case: JSRF + CreateOptions &= (~FILE_NO_INTERMEDIATE_BUFFERING); + // Force ShareAccess to all ShareAccess = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;