Always give an error on querying a file for compression information. This fixes Banjo-Kazooie and other games that rely on XtcdDecompression.
This commit is contained in:
parent
33d40bee95
commit
5c404ddfdb
|
@ -514,23 +514,22 @@ SHIM_CALL NtQueryInformationFile_shim(PPCContext* ppc_state,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XFileXctdCompressionInformation:
|
case XFileXctdCompressionInformation:
|
||||||
// Read timeout.
|
assert_true(length == 4);
|
||||||
if (length == 4) {
|
/*
|
||||||
uint32_t magic;
|
// This is wrong and puts files into wrong states for games that use XctdDecompression.
|
||||||
size_t bytes_read;
|
uint32_t magic;
|
||||||
result = file->Read(&magic, sizeof(magic), 0, &bytes_read);
|
size_t bytes_read;
|
||||||
if (XSUCCEEDED(result)) {
|
result = file->Read(&magic, sizeof(magic), 0, &bytes_read);
|
||||||
if (bytes_read == sizeof(magic)) {
|
if (XSUCCEEDED(result)) {
|
||||||
info = 4;
|
if (bytes_read == sizeof(magic)) {
|
||||||
SHIM_SET_MEM_32(file_info_ptr,
|
info = 4;
|
||||||
magic == xe::byte_swap(0x0FF512ED));
|
SHIM_SET_MEM_32(file_info_ptr, magic == xe::byte_swap(0x0FF512ED) ? 1 : 0);
|
||||||
} else {
|
} else {
|
||||||
result = X_STATUS_UNSUCCESSFUL;
|
result = X_STATUS_UNSUCCESSFUL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
result = X_STATUS_INFO_LENGTH_MISMATCH;
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
result = X_STATUS_UNSUCCESSFUL;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// Unsupported, for now.
|
// Unsupported, for now.
|
||||||
|
|
Loading…
Reference in New Issue