Skip to content

Commit

Permalink
call Renderer2D::VBlankEnd at vblank end
Browse files Browse the repository at this point in the history
instead of vblank start
  • Loading branch information
RSDuck committed Mar 1, 2021
1 parent a046eb5 commit 41dd448
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/GPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@ void StartScanline(u32 line)
{
if (line == 0)
{
GPU2D_Renderer->VBlankEnd(&GPU2D_A, &GPU2D_B);
GPU2D_A.VBlankEnd();
GPU2D_B.VBlankEnd();
}
Expand Down Expand Up @@ -1146,7 +1147,6 @@ void StartScanline(u32 line)
if (DispStat[0] & (1<<3)) NDS::SetIRQ(0, NDS::IRQ_VBlank);
if (DispStat[1] & (1<<3)) NDS::SetIRQ(1, NDS::IRQ_VBlank);

GPU2D_Renderer->VBlankEnd(&GPU2D_A, &GPU2D_B);
GPU2D_A.VBlank();
GPU2D_B.VBlank();
GPU3D::VBlank();
Expand Down
2 changes: 1 addition & 1 deletion src/GPU2D_Soft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ void SoftRenderer::VBlankEnd(Unit* unitA, Unit* unitB)
#ifdef OGLRENDERER_ENABLED
if (GPU3D::CurrentRenderer->Accelerated)
{
if ((unitA->CaptureLatch) && (((unitA->CaptureCnt >> 29) & 0x3) != 1))
if ((unitA->CaptureCnt & (1<<31)) && (((unitA->CaptureCnt >> 29) & 0x3) != 1))
{
reinterpret_cast<GPU3D::GLRenderer*>(GPU3D::CurrentRenderer.get())->PrepareCaptureFrame();
}
Expand Down

0 comments on commit 41dd448

Please sign in to comment.