From b695f1596fe06a922791b4223aeef6a6a577f865 Mon Sep 17 00:00:00 2001 From: rogerman Date: Sun, 31 Jan 2016 06:00:03 +0000 Subject: [PATCH] GPU: - Remove the other reference to the DISPCNT.BG0_Enable flag for determining when 3D rendering is enabled. Fixes minimap rendering at custom resolutions in Advance Wars: Dual Strike during some conversations. (Related to r5334.) --- desmume/src/GPU.cpp | 5 +---- desmume/src/GPU.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp index dcf83e5c2..b8fb9de45 100644 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -422,7 +422,6 @@ void GPUEngineBase::_Reset_Base() this->_needUpdateWINH[1] = true; this->isCustomRenderingNeeded = false; - this->is3DEnabled = false; this->vramBGLayer = VRAM_NO_3D_USAGE; this->vramBlockBGIndex = VRAM_NO_3D_USAGE; this->vramBlockOBJIndex = VRAM_NO_3D_USAGE; @@ -5273,7 +5272,6 @@ void GPUSubsystem::UpdateVRAM3DUsageProperties() this->_VRAM3DUsage.blockIndexDisplayVRAM = VRAM_NO_3D_USAGE; - this->_engineMain->is3DEnabled = (mainDISPCNT.BG0_Enable == 1) && (mainDISPCNT.BG0_3D == 1); this->_engineMain->isCustomRenderingNeeded = false; this->_engineMain->vramBlockBGIndex = VRAM_NO_3D_USAGE; this->_engineMain->vramBlockOBJIndex = VRAM_NO_3D_USAGE; @@ -5282,7 +5280,6 @@ void GPUSubsystem::UpdateVRAM3DUsageProperties() this->_engineMain->renderedHeight = GPU_FRAMEBUFFER_NATIVE_HEIGHT; this->_engineMain->renderedBuffer = this->_engineMain->nativeBuffer; - this->_engineSub->is3DEnabled = false; this->_engineSub->isCustomRenderingNeeded = false; this->_engineSub->vramBlockBGIndex = VRAM_NO_3D_USAGE; this->_engineSub->vramBlockOBJIndex = VRAM_NO_3D_USAGE; @@ -5309,7 +5306,7 @@ void GPUSubsystem::UpdateVRAM3DUsageProperties() return; } - this->_engineMain->isCustomRenderingNeeded = this->_engineMain->is3DEnabled; + this->_engineMain->isCustomRenderingNeeded = (mainDISPCNT.BG0_3D != 0); // Iterate through VRAM banks A-D and determine if they will be used for this frame. for (size_t i = 0; i < 4; i++) diff --git a/desmume/src/GPU.h b/desmume/src/GPU.h index 5eca4b57f..f98e24b6c 100644 --- a/desmume/src/GPU.h +++ b/desmume/src/GPU.h @@ -1293,7 +1293,6 @@ public: void FramebufferPostprocess(); bool isCustomRenderingNeeded; - bool is3DEnabled; u8 vramBGLayer; u8 vramBlockBGIndex; u8 vramBlockOBJIndex;