aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRSDuck <RSDuck@users.noreply.github.com>2021-03-01 04:06:11 +0100
committerRSDuck <RSDuck@users.noreply.github.com>2021-03-01 04:06:11 +0100
commit41dd448e285e6879cc28ce7ff9664457354d0265 (patch)
tree62307fcd6883580d0f4f4d9e66f84771a40fe1fe
parenta046eb50384e5f55f7d6ca7e69417e8b013a8c5a (diff)
call Renderer2D::VBlankEnd at vblank end
instead of vblank start
-rw-r--r--src/GPU.cpp2
-rw-r--r--src/GPU2D_Soft.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/GPU.cpp b/src/GPU.cpp
index 57df8ae..6a17bc1 100644
--- a/src/GPU.cpp
+++ b/src/GPU.cpp
@@ -1107,6 +1107,7 @@ void StartScanline(u32 line)
{
if (line == 0)
{
+ GPU2D_Renderer->VBlankEnd(&GPU2D_A, &GPU2D_B);
GPU2D_A.VBlankEnd();
GPU2D_B.VBlankEnd();
}
@@ -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();
diff --git a/src/GPU2D_Soft.cpp b/src/GPU2D_Soft.cpp
index a244083..325ab75 100644
--- a/src/GPU2D_Soft.cpp
+++ b/src/GPU2D_Soft.cpp
@@ -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();
}