GBA RR: Fix VBM handling of lag frames
Jeffrey Pfau jeffrey@endrift.com
Tue, 24 Mar 2015 22:26:37 -0700
1 files changed,
7 insertions(+),
1 deletions(-)
jump to
M
src/gba/rr/vbm.c
→
src/gba/rr/vbm.c
@@ -94,7 +94,12 @@ return false;
} void GBAVBMNextFrame(struct GBARRContext* rr) { - UNUSED(rr); + if (!rr->isPlaying(rr)) { + return; + } + + struct GBAVBMContext* vbm = (struct GBAVBMContext*) rr; + vbm->vbmFile->seek(vbm->vbmFile, sizeof(uint16_t), SEEK_CUR); } uint16_t GBAVBMQueryInput(struct GBARRContext* rr) {@@ -105,6 +110,7 @@
struct GBAVBMContext* vbm = (struct GBAVBMContext*) rr; uint16_t input; vbm->vbmFile->read(vbm->vbmFile, &input, sizeof(input)); + vbm->vbmFile->seek(vbm->vbmFile, -sizeof(input), SEEK_CUR); return input & 0x3FF; }