Fix crashing when trying to start recording while recording
Jeffrey Pfau jeffrey@endrift.com
Sun, 03 Aug 2014 20:19:19 -0700
1 files changed,
5 insertions(+),
3 deletions(-)
jump to
M
src/platform/sdl/sdl-events.c
→
src/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;