all repos — mgba @ 7551afc952498113047689d16c97447caea627da

mGBA Game Boy Advance Emulator

GBA Video: Fix frameskip affecting timing
Vicki Pfau vi@endrift.com
Sun, 02 Aug 2020 15:35:03 -0700
commit

7551afc952498113047689d16c97447caea627da

parent

9ab0f2d1b59d7c6f3bcb28f48e5a17d7cb00e1ec

1 files changed, 4 insertions(+), 2 deletions(-)

jump to
M src/gba/video.csrc/gba/video.c

@@ -148,8 +148,10 @@ video->vcount = 0;

} video->p->memory.io[REG_VCOUNT >> 1] = video->vcount; - if (video->vcount < GBA_VIDEO_VERTICAL_PIXELS && video->frameskipCounter <= 0) { - video->renderer->drawScanline(video->renderer, video->vcount); + if (video->vcount < GBA_VIDEO_VERTICAL_PIXELS) { + if (video->frameskipCounter <= 0) { + video->renderer->drawScanline(video->renderer, video->vcount); + } video->shouldStall = 1; }