GB Video: Discard SGB packets in non-SGB mVLs

This commit is contained in:
Vicki Pfau 2021-03-23 19:34:08 -07:00
parent 118bee2fa2
commit ffeb5cfe27
3 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;