MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / showFpsSpeed

Method showFpsSpeed

gui/qt/mainwindow.cpp:1618–1629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1616}
1617
1618void MainWindow::showFpsSpeed(double emuFps, double guiFps) {
1619 static double guiFpsPrev = 0;
1620 static double emuFpsPrev = 0;
1621 if (emuFps && (emuFps < emuFpsPrev - 0.01 || emuFps > emuFpsPrev + 0.01)) {
1622 ui->maxFps->setText(tr("Actual FPS: ") + QString::number(emuFps, 'f', 2));
1623 emuFpsPrev = emuFps;
1624 }
1625 if (guiFps < guiFpsPrev - 0.01 || guiFps > guiFpsPrev + 0.01) {
1626 m_fpsLabel.setText("FPS: " + (guiFps ? QString::number(guiFps, 'f', 2) : tr("N/A")));
1627 guiFpsPrev = guiFps;
1628 }
1629}
1630
1631void MainWindow::timeoutFpsSpeed() {
1632 showFpsSpeed(0.0, 0.0);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected