diff --git a/CHANGES b/CHANGES index d0b981ffc..ed26487db 100644 --- a/CHANGES +++ b/CHANGES @@ -86,6 +86,7 @@ Other fixes: - 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 diff --git a/include/mgba/internal/gb/renderers/proxy.h b/include/mgba/internal/gb/renderers/proxy.h index bde4e2ddb..ca3b59f29 100644 --- a/include/mgba/internal/gb/renderers/proxy.h +++ b/include/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); diff --git a/src/gb/extra/proxy.c b/src/gb/extra/proxy.c index cea273692..54d46eef3 100644 --- a/src/gb/extra/proxy.c +++ b/src/gb/extra/proxy.c @@ -131,6 +131,7 @@ void GBVideoProxyRendererInit(struct GBVideoRenderer* renderer, enum GBModel mod _init(proxyRenderer); + proxyRenderer->model = model; proxyRenderer->backend->init(proxyRenderer->backend, model, borders); } @@ -191,7 +192,9 @@ static bool _parsePacket(struct mVideoLogger* logger, const struct mVideoLoggerD 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;