From 740e4d09920021de7693381326969f15c210e034 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 30 Jan 2016 18:42:32 +0100 Subject: [PATCH] DVDInterface: Move a check from SetDiscInside to SetLidOpen --- Source/Core/Core/HW/DVDInterface.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp index c333627b8a..0478f7a9a8 100644 --- a/Source/Core/Core/HW/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVDInterface.cpp @@ -507,9 +507,7 @@ bool VolumeIsValid() void SetDiscInside(bool disc_inside) { - if (s_disc_inside != disc_inside) - SetLidOpen(!disc_inside); - + SetLidOpen(!disc_inside); s_disc_inside = disc_inside; } @@ -572,9 +570,10 @@ void ChangeDiscAsCPU(const std::string& new_path) void SetLidOpen(bool open) { + u32 old_value = s_DICVR.CVR; s_DICVR.CVR = open ? 1 : 0; - - GenerateDIInterrupt(INT_CVRINT); + if (s_DICVR.CVR != old_value) + GenerateDIInterrupt(INT_CVRINT); } bool ChangePartition(u64 offset)