Add fast forward option

This commit is contained in:
Cacodemon345
2026-01-08 18:46:23 +06:00
parent 06c3186858
commit 75cfe2bc7d
10 changed files with 48 additions and 9 deletions

View File

@@ -100,6 +100,7 @@ extern int qt_nvr_save(void);
extern void exit_pause(void);
bool cpu_thread_running = false;
bool fast_forward = false;
}
#include <locale.h>
@@ -452,7 +453,7 @@ main_thread_fn()
#endif
drawits += static_cast<int>(new_time - old_time);
old_time = new_time;
if (drawits > 0 && !dopause) {
if ((drawits > 0 || fast_forward) && !dopause) {
/* Yes, so run frames now. */
do {
#ifdef USE_INSTRUMENT
@@ -478,8 +479,9 @@ main_thread_fn()
}
drawits -= force_10ms ? 10 : 1;
if (drawits > 50)
if (drawits > 50 || fast_forward)
drawits = 0;
} while (drawits > 0);
} else {
/* Just so we dont overload the host OS. */