all repos — mgba @ ffeb5cfe2779b5f0c633e13e15adef651658d160

mGBA Game Boy Advance Emulator

GB Video: Discard SGB packets in non-SGB mVLs
Vicki Pfau vi@endrift.com
Tue, 23 Mar 2021 19:34:08 -0700
commit

ffeb5cfe2779b5f0c633e13e15adef651658d160

parent

118bee2fa2eecba31cec15d4d6d1299a0ccac482

3 files changed, 6 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -86,6 +86,7 @@ - GB: Fix crash when changing ROM while in banked address space

- GB: Fix loading model overrides - GB Serialize: Fix crash when loading pre-0.7 SGB savestates - GB Video: Fix SGB video logs + - GB Video: Discard SGB packets in non-SGB mVLs - GBA: Fix loading multiboot ELF files (fixes mgba.io/i/1949) - GBA: Fix loading subsequent save files (fixes mgba.io/i/2067) - mGUI: Don't attempt to preload files larger than can fit in RAM
M include/mgba/internal/gb/renderers/proxy.hinclude/mgba/internal/gb/renderers/proxy.h

@@ -17,6 +17,7 @@ struct GBVideoProxyRenderer {

struct GBVideoRenderer d; struct GBVideoRenderer* backend; struct mVideoLogger* logger; + enum GBModel model; }; void GBVideoProxyRendererCreate(struct GBVideoProxyRenderer* renderer, struct GBVideoRenderer* backend);
M src/gb/extra/proxy.csrc/gb/extra/proxy.c

@@ -131,6 +131,7 @@ struct GBVideoProxyRenderer* proxyRenderer = (struct GBVideoProxyRenderer*) renderer;

_init(proxyRenderer); + proxyRenderer->model = model; proxyRenderer->backend->init(proxyRenderer->backend, model, borders); }

@@ -191,7 +192,9 @@ logger->readData(logger, legacyBuffer, item->value2, true);

break; case BUFFER_SGB: logger->readData(logger, sgbPacket, 16, true); - proxyRenderer->backend->writeSGBPacket(proxyRenderer->backend, sgbPacket); + if (proxyRenderer->model & GB_MODEL_SGB) { + proxyRenderer->backend->writeSGBPacket(proxyRenderer->backend, sgbPacket); + } break; } break;