all repos — mgba @ b6ddf8fd0081a9dc9b5b491f4ef573faf0779cad

mGBA Game Boy Advance Emulator

GBA RR: Fix VBM handling of lag frames
Jeffrey Pfau jeffrey@endrift.com
Tue, 24 Mar 2015 22:26:37 -0700
commit

b6ddf8fd0081a9dc9b5b491f4ef573faf0779cad

parent

3d8cfda57d900bc744571944533301f9ce83ae59

1 files changed, 7 insertions(+), 1 deletions(-)

jump to
M src/gba/rr/vbm.csrc/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; }