From 04e06869d9de0836c9e97102e5e9cdea987592cd Mon Sep 17 00:00:00 2001 From: rogerman Date: Thu, 3 Mar 2016 01:27:23 +0000 Subject: [PATCH] GPU: - Fix bug where the background would blink in The Wizard of Oz: Beyond the Yellow Brick Road when frameskip is enabled. (Regression from r5368). --- desmume/src/GPU.cpp | 75 --------------------------------------------- desmume/src/GPU.h | 1 - 2 files changed, 76 deletions(-) diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp index e7758be83..f63689a16 100644 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -4451,81 +4451,6 @@ void GPUEngineA::RenderLine(const u16 l) } } -void GPUEngineA::UpdatePropertiesWithoutRender(const u16 l) -{ - GPUEngineBase::UpdatePropertiesWithoutRender(l); - - // Update display capture properties - const IOREG_DISPCAPCNT &DISPCAPCNT = this->_IORegisterMap->DISPCAPCNT; - const u8 vramWriteBlock = DISPCAPCNT.VRAMWriteBlock; - - if ((DISPCAPCNT.CaptureEnable != 0) && (vramConfiguration.banks[vramWriteBlock].purpose == VramConfiguration::LCDC) && (l < this->_dispCapCnt.capy)) - { - const IOREG_DISPCNT &DISPCNT = this->_IORegisterMap->DISPCNT; - const u8 vramReadBlock = DISPCNT.VRAM_Block; - const size_t writeLineIndexWithOffset = (DISPCAPCNT.VRAMWriteOffset * 64) + l; - const size_t readLineIndexWithOffset = (this->_dispCapCnt.readOffset * 64) + l; - bool newCaptureLineNativeState = true; - - switch (DISPCAPCNT.CaptureSrc) - { - case 0: // Capture source is SourceA - { - switch (DISPCAPCNT.SrcA) - { - case 0: - newCaptureLineNativeState = !this->isCustomRenderingNeeded; - break; - - case 1: - newCaptureLineNativeState = this->WillRender3DLayer() && CurrentRenderer->IsFramebufferNativeSize(); - break; - } - break; - } - - case 1: // Capture source is SourceB - { - switch (DISPCAPCNT.SrcB) - { - case 0: // Capture VRAM - newCaptureLineNativeState = this->isLineCaptureNative[vramReadBlock][readLineIndexWithOffset]; - break; - - case 1: // Capture FIFO - newCaptureLineNativeState = true; - break; - } - break; - } - - default: // Capture source is SourceA+B blended - { - if ( (DISPCAPCNT.SrcB == 0) && !this->isLineCaptureNative[vramReadBlock][readLineIndexWithOffset] ) - { - newCaptureLineNativeState = false; - } - else - { - newCaptureLineNativeState = !this->isCustomRenderingNeeded; - } - break; - } - } - - if (this->isLineCaptureNative[vramWriteBlock][writeLineIndexWithOffset] && !newCaptureLineNativeState) - { - this->isLineCaptureNative[vramWriteBlock][writeLineIndexWithOffset] = false; - this->nativeLineCaptureCount[vramWriteBlock]--; - } - else if (!this->isLineCaptureNative[vramWriteBlock][writeLineIndexWithOffset] && newCaptureLineNativeState) - { - this->isLineCaptureNative[vramWriteBlock][writeLineIndexWithOffset] = true; - this->nativeLineCaptureCount[vramWriteBlock]++; - } - } -} - u16* GPUEngineA::_RenderLine_Layers(const u16 l) { const NDSDisplayInfo &dispInfo = GPU->GetDisplayInfo(); diff --git a/desmume/src/GPU.h b/desmume/src/GPU.h index 2ecb35740..dcc5202fd 100644 --- a/desmume/src/GPU.h +++ b/desmume/src/GPU.h @@ -1423,7 +1423,6 @@ public: bool WillCapture3DLayerDirect(); bool VerifyVRAMLineDidChange(const size_t blockID, const size_t l); - void UpdatePropertiesWithoutRender(const u16 l); void FramebufferPostprocess(); virtual void Reset();