all repos — mgba @ e017d93f3fd2e2c7f8b5243e57cf45aa34a44d7c

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

e017d93f3fd2e2c7f8b5243e57cf45aa34a44d7c

parent

9b2e5a5541870e92c1b8cb235fd57d88a74b58dc

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

jump to
M CHANGESCHANGES

@@ -4,6 +4,7 @@ - GB Audio: Fix initial sweep state

- GB Audio: Fix deserializing audio channels 2 and 3 - GB Audio: Fix deserializing while audio was disabled (fixes mgba.io/i/1305) - 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 Audio: Fix deserializing SOUNDCNT_L - GBA Audio: Fix stereo in XQ audio - GBA Audio: Fix volume/mute in XQ audio (fixes mgba.io/i/1864)
M src/gb/extra/proxy.csrc/gb/extra/proxy.c

@@ -238,6 +238,9 @@

void GBVideoProxyRendererDrawRange(struct GBVideoRenderer* renderer, int startX, int endX, int y, struct GBObj* obj, size_t oamMax) { 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, obj, oamMax); } mVideoLoggerWriteBuffer(proxyRenderer->logger, BUFFER_OAM, 0, oamMax * sizeof(*obj), obj);
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);