From 419ed1b46a2a86e665f5885fd8fbd4609c39cf4a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 9 Apr 2018 03:18:51 -0400 Subject: [PATCH] DVDInterface: Deduplicate code in UpdateInterrupts() --- Source/Core/Core/HW/DVD/DVDInterface.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/HW/DVD/DVDInterface.cpp b/Source/Core/Core/HW/DVD/DVDInterface.cpp index b7d897fdbc..838148174b 100644 --- a/Source/Core/Core/HW/DVD/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVD/DVDInterface.cpp @@ -586,15 +586,11 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) void UpdateInterrupts() { - if ((s_DISR.DEINT & s_DISR.DEINITMASK) || (s_DISR.TCINT & s_DISR.TCINTMASK) || - (s_DISR.BRKINT & s_DISR.BRKINTMASK) || (s_DICVR.CVRINT & s_DICVR.CVRINTMASK)) - { - ProcessorInterface::SetInterrupt(ProcessorInterface::INT_CAUSE_DI, true); - } - else - { - ProcessorInterface::SetInterrupt(ProcessorInterface::INT_CAUSE_DI, false); - } + const bool set_mask = (s_DISR.DEINT & s_DISR.DEINITMASK) || (s_DISR.TCINT & s_DISR.TCINTMASK) || + (s_DISR.BRKINT & s_DISR.BRKINTMASK) || + (s_DICVR.CVRINT & s_DICVR.CVRINTMASK); + + ProcessorInterface::SetInterrupt(ProcessorInterface::INT_CAUSE_DI, set_mask); // Required for Summoner: A Goddess Reborn CoreTiming::ForceExceptionCheck(50);