From 6b5aff79ad7046558eab68afab2a788e5eb424a2 Mon Sep 17 00:00:00 2001 From: rogerman Date: Thu, 3 Mar 2016 19:57:36 +0000 Subject: [PATCH] GPU: - Remove now obsolete template parameter from GPUEngineA::_RenderLine_DisplayCapture(). --- desmume/src/GPU.cpp | 66 ++++++++++++++++++++++++++++----------------- desmume/src/GPU.h | 2 +- 2 files changed, 42 insertions(+), 26 deletions(-) diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp index f63689a16..3ae3d1473 100644 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -4428,25 +4428,11 @@ void GPUEngineA::RenderLine(const u16 l) { if (DISPCAPCNT.CaptureSize == DisplayCaptureSize_128x128) { - if (this->isLineRenderNative[l]) - { - this->_RenderLine_DisplayCapture(renderLineTarget, l); - } - else - { - this->_RenderLine_DisplayCapture(renderLineTarget, l); - } + this->_RenderLine_DisplayCapture(renderLineTarget, l); } else { - if (this->isLineRenderNative[l]) - { - this->_RenderLine_DisplayCapture(renderLineTarget, l); - } - else - { - this->_RenderLine_DisplayCapture(renderLineTarget, l); - } + this->_RenderLine_DisplayCapture(renderLineTarget, l); } } } @@ -4704,7 +4690,7 @@ u16* GPUEngineA::_RenderLine_Layers(const u16 l) return currentRenderLineTarget; } -template +template void GPUEngineA::_RenderLine_DisplayCapture(const u16 *renderedLineSrcA, const u16 l) { assert( (CAPTURELENGTH == GPU_FRAMEBUFFER_NATIVE_WIDTH/2) || (CAPTURELENGTH == GPU_FRAMEBUFFER_NATIVE_WIDTH) ); @@ -4765,7 +4751,7 @@ void GPUEngineA::_RenderLine_DisplayCapture(const u16 *renderedLineSrcA, const u case 0: // Capture screen (BG + OBJ + 3D) { //INFO("Capture screen (BG + OBJ + 3D)\n"); - if (!DIDCUSTOMRENDER) + if (this->isLineRenderNative[l]) { this->_RenderLine_DispCapture_Copy<0, CAPTURELENGTH, true, true>(srcA, cap_dst, CAPTURELENGTH, 1); } @@ -4774,7 +4760,7 @@ void GPUEngineA::_RenderLine_DisplayCapture(const u16 *renderedLineSrcA, const u this->_RenderLine_DispCapture_Copy<0, CAPTURELENGTH, false, true>(srcA, cap_dst, CAPTURELENGTH, 1); } - newCaptureLineNativeState = !DIDCUSTOMRENDER; + newCaptureLineNativeState = this->isLineRenderNative[l]; break; } @@ -4839,7 +4825,15 @@ void GPUEngineA::_RenderLine_DisplayCapture(const u16 *renderedLineSrcA, const u { if ( (DISPCAPCNT.SrcB == 0) && !this->isLineCaptureNative[vramReadBlock][readLineIndexWithOffset] ) { - this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst, CAPTURELENGTH, 1); + if (this->isLineRenderNative[l]) + { + this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst, CAPTURELENGTH, 1); + } + else + { + this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst, CAPTURELENGTH, 1); + } + newCaptureLineNativeState = false; } else @@ -4850,8 +4844,16 @@ void GPUEngineA::_RenderLine_DisplayCapture(const u16 *renderedLineSrcA, const u this->_RenderLine_DispCapture_FIFOToBuffer(fifoLine); } - this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst, CAPTURELENGTH, 1); - newCaptureLineNativeState = !DIDCUSTOMRENDER; + if (this->isLineRenderNative[l]) + { + this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst, CAPTURELENGTH, 1); + } + else + { + this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst, CAPTURELENGTH, 1); + } + + newCaptureLineNativeState = this->isLineRenderNative[l]; } } else @@ -4937,7 +4939,7 @@ void GPUEngineA::_RenderLine_DisplayCapture(const u16 *renderedLineSrcA, const u { case 0: // Capture screen (BG + OBJ + 3D) { - if (!DIDCUSTOMRENDER) + if (this->isLineRenderNative[l]) { this->_RenderLine_DispCapture_Copy<0, CAPTURELENGTH, true, false>(srcA, cap_dst_ext, captureLengthExt, captureLineCount); } @@ -4994,11 +4996,25 @@ void GPUEngineA::_RenderLine_DisplayCapture(const u16 *renderedLineSrcA, const u { if ( (DISPCAPCNT.SrcB == 0) && !this->isLineCaptureNative[vramReadBlock][readLineIndexWithOffset] ) { - this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst_ext, captureLengthExt, captureLineCount); + if (this->isLineRenderNative[l]) + { + this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst_ext, captureLengthExt, captureLineCount); + } + else + { + this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst_ext, captureLengthExt, captureLineCount); + } } else { - this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst_ext, captureLengthExt, captureLineCount); + if (this->isLineRenderNative[l]) + { + this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst_ext, captureLengthExt, captureLineCount); + } + else + { + this->_RenderLine_DispCapture_Blend(srcA, srcB, cap_dst_ext, captureLengthExt, captureLineCount); + } } } else diff --git a/desmume/src/GPU.h b/desmume/src/GPU.h index dcc5202fd..2bd3424f5 100644 --- a/desmume/src/GPU.h +++ b/desmume/src/GPU.h @@ -1385,7 +1385,7 @@ protected: template void _LineLarge8bpp(u16 *__restrict dstColorLine, const u16 lineIndex); u16* _RenderLine_Layers(const u16 l); - template void _RenderLine_DisplayCapture(const u16 *renderedLineSrcA, const u16 l); + template void _RenderLine_DisplayCapture(const u16 *renderedLineSrcA, const u16 l); void _RenderLine_DispCapture_FIFOToBuffer(u16 *fifoLineBuffer); template