From 5c454379aecfac0649624c36483a926653f21111 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 6 Sep 2015 12:15:01 +0200 Subject: [PATCH] DVDInterface: Use ROUND_DOWN --- Source/Core/Core/HW/DVDInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp index 02811e942a..4cad81cad8 100644 --- a/Source/Core/Core/HW/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVDInterface.cpp @@ -11,6 +11,7 @@ #include "Common/ChunkFile.h" #include "Common/CommonTypes.h" +#include "Common/MathUtil.h" #include "Core/ConfigManager.h" #include "Core/CoreTiming.h" @@ -1397,7 +1398,7 @@ u64 SimulateDiscReadTime(u64 offset, u32 length) } } - g_last_read_offset = (offset + length - 2048) & ~2047; + g_last_read_offset = ROUND_DOWN(offset + length - 2048, 2048); return ticks_until_completion; }