GPU: Fix BG layer 3 when reading VRAM with a BMPAddress that maps exactly to the head of the VRAM blank region.

Fixes a possible graphical glitch during the Arangoa Prelude in Golden
Sun: Dark Dawn.
This commit is contained in:
rogerman 2016-12-10 21:26:30 -08:00
parent cf3758ff3f
commit 1787081fca
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}