mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 01:48:21 -07:00
Add fast forward option
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user