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); } }
static char* progressText() { static char text[128]; int amount = boardCaptureCompleteAmount(); sprintf(text, "%s %d.%d%%", langDlgAmountCompleted(), amount / 10, amount % 10); return text; }