Ejemplo n.º 1
0
static void boardTimerCb(void* dummy, UInt32 time)
{
    if (cap.state == CAPTURE_PLAY) {
        // If we reached the end time +/- 2 seconds we know we should stop
        // the capture. If not, we restart the timer 1/4 of max time into
        // the future. (Enventually we'll hit the real end time
        // This is an ugly workaround for the internal timers short timespan
        // (~3 minutes). Using the 64 bit timer we can extend the capture to
        // 90 days.
        // Will work correct with 'real' 64 bit timers
        boardSystemTime64(); // Sync clock
        if (boardCaptureCompleteAmount() < 1000) {
            boardTimerAdd(cap.timer, time + 0x40000000);
        }
        else {
            actionEmuTogglePause();
            cap.state = CAPTURE_IDLE;
        }
    }
    
    if (cap.state == CAPTURE_REC) {
        cap.state = CAPTURE_IDLE;
        boardCaptureStart(cap.filename);
    }
}
Ejemplo n.º 2
0
void actionVideoCaptureRec() {
    if (emulatorGetState() == EMU_STOPPED) {
        strcpy(state.properties->filehistory.videocap, generateSaveFilename(state.properties, videoDir, videoPrefix, ".cap", 2));
        boardCaptureStart(state.properties->filehistory.videocap);
        actionEmuTogglePause();
        archUpdateMenu(0);
        return;
    }

    emulatorSuspend();

    strcpy(state.properties->filehistory.videocap, generateSaveFilename(state.properties, videoDir, videoPrefix, ".cap", 2));
    boardCaptureStart(state.properties->filehistory.videocap);

    emulatorResume();
    archUpdateMenu(0);
}