all repos — mgba @ 9dfa8f753ff466e92be2052db771dff0ae9df240

mGBA Game Boy Advance Emulator

GB, GBA Video: Copy disable flags when drawing scanlines in proxy when not blocking
Vicki Pfau vi@endrift.com
Wed, 21 Oct 2020 22:00:27 -0700
commit

9dfa8f753ff466e92be2052db771dff0ae9df240

parent

5af50db66cbde07430fe5b98d26dc7fa0460bd5a

3 files changed, 13 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -23,6 +23,7 @@ - GB MBC: Fix MBC1 mode changing behavior

- GB MBC: Fix some MBC3 bit masking - GB Video: Fix state after skipping BIOS (fixes mgba.io/i/1715 and mgba.io/i/1716) - GB Video: Fix drawing background when window is force-disabled by frontend + - GB, GBA Video: Copy disable flags when drawing scanlines in proxy when not blocking - GBA: Fix timing advancing too quickly in rare cases - GBA: Clear GBP connection on reset - GBA Audio: Fix deserializing SOUNDCNT_L
M src/gb/extra/proxy.csrc/gb/extra/proxy.c

@@ -235,6 +235,9 @@

void GBVideoProxyRendererDrawRange(struct GBVideoRenderer* renderer, int startX, int endX, int y) { struct GBVideoProxyRenderer* proxyRenderer = (struct GBVideoProxyRenderer*) renderer; if (!proxyRenderer->logger->block) { + proxyRenderer->backend->disableBG = proxyRenderer->d.disableBG; + proxyRenderer->backend->disableWIN = proxyRenderer->d.disableWIN; + proxyRenderer->backend->disableOBJ = proxyRenderer->d.disableOBJ; proxyRenderer->backend->drawRange(proxyRenderer->backend, startX, endX, y); } mVideoLoggerRendererDrawRange(proxyRenderer->logger, startX, endX, y);
M src/gba/extra/proxy.csrc/gba/extra/proxy.c

@@ -297,6 +297,15 @@

void GBAVideoProxyRendererDrawScanline(struct GBAVideoRenderer* renderer, int y) { struct GBAVideoProxyRenderer* proxyRenderer = (struct GBAVideoProxyRenderer*) renderer; if (!proxyRenderer->logger->block) { + proxyRenderer->backend->disableBG[0] = proxyRenderer->d.disableBG[0]; + proxyRenderer->backend->disableBG[1] = proxyRenderer->d.disableBG[1]; + proxyRenderer->backend->disableBG[2] = proxyRenderer->d.disableBG[2]; + proxyRenderer->backend->disableBG[3] = proxyRenderer->d.disableBG[3]; + proxyRenderer->backend->disableOBJ = proxyRenderer->d.disableOBJ; + proxyRenderer->backend->highlightBG[0] = proxyRenderer->d.highlightBG[0]; + proxyRenderer->backend->highlightBG[1] = proxyRenderer->d.highlightBG[1]; + proxyRenderer->backend->highlightBG[2] = proxyRenderer->d.highlightBG[2]; + proxyRenderer->backend->highlightBG[3] = proxyRenderer->d.highlightBG[3]; proxyRenderer->backend->drawScanline(proxyRenderer->backend, y); } mVideoLoggerRendererDrawScanline(proxyRenderer->logger, y);