mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[Emulator] Fixed ZAR loading. Thanks Adrian
This commit is contained in:
parent
5efcc6a71b
commit
c9bf44f4f4
|
|
@ -423,7 +423,7 @@ Emulator::FileSignatureType Emulator::GetFileSignature(
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint64_t file_size = std::filesystem::file_size(path);
|
const uint64_t file_size = std::filesystem::file_size(path);
|
||||||
const uint64_t header_size = 4;
|
const int64_t header_size = 4;
|
||||||
|
|
||||||
if (file_size < header_size) {
|
if (file_size < header_size) {
|
||||||
return FileSignatureType::Unknown;
|
return FileSignatureType::Unknown;
|
||||||
|
|
@ -463,7 +463,7 @@ Emulator::FileSignatureType Emulator::GetFileSignature(
|
||||||
}
|
}
|
||||||
|
|
||||||
file = xe::filesystem::OpenFile(path, "rb");
|
file = xe::filesystem::OpenFile(path, "rb");
|
||||||
xe::filesystem::Seek(file, header_size, SEEK_END);
|
xe::filesystem::Seek(file, -header_size, SEEK_END);
|
||||||
fread_s(file_magic, sizeof(file_magic), 1, header_size, file);
|
fread_s(file_magic, sizeof(file_magic), 1, header_size, file);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue