Permalink
Browse files

GPU: Fix BG layer 3 when reading VRAM with a BMPAddress that maps exa…

…ctly to the head of the VRAM blank region.

Fixes a possible graphical glitch during the Arangoa Prelude in Golden
Sun: Dark Dawn.
  • Loading branch information...
1 parent cf3758f commit 1787081fca6f18d4bef0bb358be1737dbe1ffa64 @rogerman rogerman committed Dec 11, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 desmume/src/GPU.cpp
View
@@ -3062,7 +3062,7 @@ void GPUEngineBase::_RenderLine_BGExtended(GPUEngineCompositorInfo &compInfo, co
{
const size_t vramPixel = (size_t)((u8 *)MMU_gpu_map(compInfo.renderState.selectedBGLayer->BMPAddress) - MMU.ARM9_LCD) / sizeof(u16);
- if (vramPixel > (GPU_FRAMEBUFFER_NATIVE_WIDTH * GPU_VRAM_BLOCK_LINES * 4))
+ if (vramPixel >= (GPU_FRAMEBUFFER_NATIVE_WIDTH * GPU_VRAM_BLOCK_LINES * 4))
{
outUseCustomVRAM = false;
}

0 comments on commit 1787081

Please sign in to comment.