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) {
|
/*
|
||||||
|
// This is wrong and puts files into wrong states for games that use XctdDecompression.
|
||||||
uint32_t magic;
|
uint32_t magic;
|
||||||
size_t bytes_read;
|
size_t bytes_read;
|
||||||
result = file->Read(&magic, sizeof(magic), 0, &bytes_read);
|
result = file->Read(&magic, sizeof(magic), 0, &bytes_read);
|
||||||
if (XSUCCEEDED(result)) {
|
if (XSUCCEEDED(result)) {
|
||||||
if (bytes_read == sizeof(magic)) {
|
if (bytes_read == sizeof(magic)) {
|
||||||
info = 4;
|
info = 4;
|
||||||
SHIM_SET_MEM_32(file_info_ptr,
|
SHIM_SET_MEM_32(file_info_ptr, magic == xe::byte_swap(0x0FF512ED) ? 1 : 0);
|
||||||
magic == xe::byte_swap(0x0FF512ED));
|
|
||||||
} 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