all repos — mgba @ ff200093cab7f555f97cd28dda3c5091ba4c7f71

mGBA Game Boy Advance Emulator

Fix crashing when trying to start recording while recording
Jeffrey Pfau jeffrey@endrift.com
Sun, 03 Aug 2014 20:19:19 -0700
commit

ff200093cab7f555f97cd28dda3c5091ba4c7f71

parent

fabdfc86f3c944d3d61ee728d002f1c014694aaa

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

jump to
M src/platform/sdl/sdl-events.csrc/platform/sdl/sdl-events.c

@@ -126,9 +126,11 @@ if (context->stateDir) {

GBAThreadReset(context); GBAThreadInterrupt(context); GBARRContextCreate(context->gba); - GBARRSetStream(context->gba->rr, context->stateDir); - GBARRStopPlaying(context->gba->rr); - GBARRStartRecording(context->gba->rr); + if (!GBARRIsRecording(context->gba->rr)) { + GBARRSetStream(context->gba->rr, context->stateDir); + GBARRStopPlaying(context->gba->rr); + GBARRStartRecording(context->gba->rr); + } GBAThreadContinue(context); } break;