diff --git a/src/86box.c b/src/86box.c index d242b40b9..44b6793e4 100644 --- a/src/86box.c +++ b/src/86box.c @@ -1866,6 +1866,12 @@ pc_run(void) if (title_update) { mouse_msg_idx = ((mouse_type == MOUSE_TYPE_NONE) || (mouse_input_mode >= 1)) ? 2 : !!mouse_capture; +#ifdef SCREENSHOT_MODE + if (force_10ms) + fps = ((fps + 2) / 5) * 5; + else + fps = ((fps + 20) / 50) * 50; +#endif swprintf(temp, sizeof_w(temp), mouse_msg[mouse_msg_idx], fps / (force_10ms ? 1 : 10), force_10ms ? 0 : (fps % 10)); #ifdef __APPLE__ /* Needed due to modifying the UI on the non-main thread is a big no-no. */ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ec3b2c628..b13071241 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -84,6 +84,10 @@ if(DEBUGREGS486) add_compile_definitions(USE_DEBUG_REGS_486) endif() +if(SCREENSHOT_MODE) + add_compile_definitions(SCREENSHOT_MODE) +endif() + if(VNC) find_package(LibVNCServer) if(LibVNCServer_FOUND) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 1c2e000ab..4f616e61b 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -200,7 +200,11 @@ MainWindow::MainWindow(QWidget *parent) frameRateTimer->setInterval(1000); frameRateTimer->setSingleShot(false); connect(frameRateTimer, &QTimer::timeout, [hertz_label] { - hertz_label->setText(tr("%1 Hz").arg(QString::number(monitors[0].mon_actualrenderedframes.load()) + (monitors[0].mon_interlace ? "i" : ""))); + auto hz = monitors[0].mon_actualrenderedframes.load(); +#ifdef SCREENSHOT_MODE + hz = ((hz + 2) / 5) * 5; +#endif + hertz_label->setText(tr("%1 Hz").arg(QString::number(hz) + (monitors[0].mon_interlace ? "i" : ""))); }); statusBar()->addPermanentWidget(hertz_label); frameRateTimer->start(1000);