Some games open readonly paths for writes.. hmm

This commit is contained in:
Ben Vanik 2015-01-05 23:25:32 -08:00
parent 1a70606904
commit 672ecdf252
2 changed files with 11 additions and 7 deletions

View File

@ -464,6 +464,10 @@ XEEMITTER(vavgsh, 0x10000542, VX)(PPCHIRBuilder& f, InstrData& i) {
} }
XEEMITTER(vavgsw, 0x10000582, VX)(PPCHIRBuilder& f, InstrData& i) { XEEMITTER(vavgsw, 0x10000582, VX)(PPCHIRBuilder& f, InstrData& i) {
// do i = 0 to 127 by 32
// aop = EXTS((VRA)i:i + 31)
// bop = EXTS((VRB)i:i + 31)
// VRTi:i + 31 = Chop((aop + int bop + int 1) >> 1, 32)
XEINSTRNOTIMPLEMENTED(); XEINSTRNOTIMPLEMENTED();
return 1; return 1;
} }

View File

@ -100,17 +100,17 @@ X_STATUS NtCreateFile(PPCContext* ppc_state, KernelState* state,
entry = fs->ResolvePath(object_name); entry = fs->ResolvePath(object_name);
} }
if (creation_disposition != FileDisposition::X_FILE_OPEN ||
desired_access & FileAccess::X_GENERIC_WRITE ||
desired_access & FileAccess::X_GENERIC_ALL) {
// We don't support any write modes.
XELOGW("Attempted to open the file/dir for create/write");
}
XFile* file = nullptr; XFile* file = nullptr;
if (!entry) { if (!entry) {
result = X_STATUS_NO_SUCH_FILE; result = X_STATUS_NO_SUCH_FILE;
info = X_FILE_DOES_NOT_EXIST; info = X_FILE_DOES_NOT_EXIST;
} else if (creation_disposition != FileDisposition::X_FILE_OPEN ||
desired_access & FileAccess::X_GENERIC_WRITE ||
desired_access & FileAccess::X_GENERIC_ALL) {
// We don't support any write modes.
XELOGE("Attempted to open the file/dir for create/write");
result = X_STATUS_ACCESS_DENIED;
info = entry ? X_FILE_EXISTS : X_FILE_DOES_NOT_EXIST;
} else { } else {
// Open the file/directory. // Open the file/directory.
result = fs->Open(std::move(entry), state, fs::Mode::READ, result = fs->Open(std::move(entry), state, fs::Mode::READ,