From 9036b9d8e80aa72daf4d7258ba64aac0aa04733c Mon Sep 17 00:00:00 2001 From: EmptyChaos Date: Wed, 6 Jul 2016 10:37:59 +0000 Subject: SectorReader: Fix cache line bias Minor bug where SectorReader::GetEmptyCacheLine was biased towards the first hit. --- Source/Core/DiscIO/DriveBlob.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/DiscIO/DriveBlob.cpp') diff --git a/Source/Core/DiscIO/DriveBlob.cpp b/Source/Core/DiscIO/DriveBlob.cpp index f522923f33..5a4c5aa2f1 100644 --- a/Source/Core/DiscIO/DriveBlob.cpp +++ b/Source/Core/DiscIO/DriveBlob.cpp @@ -138,9 +138,9 @@ bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8* o #ifdef _WIN32 LARGE_INTEGER offset; offset.QuadPart = GetSectorSize() * block_num; - SetFilePointerEx(m_disc_handle, offset, nullptr, FILE_BEGIN); DWORD bytes_read; - if (!ReadFile(m_disc_handle, out_ptr, static_cast(GetSectorSize() * num_blocks), + if (!SetFilePointerEx(m_disc_handle, offset, nullptr, FILE_BEGIN) || + !ReadFile(m_disc_handle, out_ptr, static_cast(GetSectorSize() * num_blocks), &bytes_read, nullptr)) { PanicAlertT("Disc Read Error"); -- cgit v1.2.3