Fix crashing when trying to start recording while recording

This commit is contained in:
Jeffrey Pfau 2014-08-03 20:19:19 -07:00
parent fabdfc86f3
commit ff200093ca

View File

@ -126,9 +126,11 @@ static void _GBASDLHandleKeypress(struct GBAThread* context, struct GBASDLEvents
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;