Merge branch '86Box:master' into pot-po-vmmupd

This commit is contained in:
Nelson Kerber Hennemann Filho
2025-08-11 08:31:33 -03:00
committed by GitHub
6 changed files with 48 additions and 5 deletions

View File

@@ -220,6 +220,16 @@ MainWindow::MainWindow(QWidget *parent)
kana_label->setToolTip(QShortcut::tr("Kana Lock"));
statusBar()->addPermanentWidget(kana_label);
auto hertz_label = new QLabel;
QTimer* frameRateTimer = new QTimer(this);
frameRateTimer->setInterval(1000);
frameRateTimer->setSingleShot(false);
connect(frameRateTimer, &QTimer::timeout, [this, hertz_label] {
hertz_label->setText(QString("%1 Hz").arg(monitors[0].mon_actualrenderedframes));
});
statusBar()->addPermanentWidget(hertz_label);
frameRateTimer->start(1000);
QTimer* ledKeyboardTimer = new QTimer(this);
ledKeyboardTimer->setTimerType(Qt::CoarseTimer);
ledKeyboardTimer->setInterval(1);

View File

@@ -45,6 +45,8 @@
#include <QKeyEvent>
#include <QWidget>
#include <QTimer>
#include <atomic>
#include <mutex>
#include <array>
@@ -96,6 +98,17 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index)
ui->setupUi(this);
m_monitor_index = monitor_index;
if (monitor_index >= 1) {
QTimer* frameRateTimer = new QTimer(this);
frameRateTimer->setSingleShot(false);
frameRateTimer->setInterval(1000);
connect(frameRateTimer, &QTimer::timeout, [this] {
this->setWindowTitle(QObject::tr("86Box Monitor #") + QString::number(m_monitor_index + 1) + QString(" - %1 Hz").arg(monitors[m_monitor_index].mon_actualrenderedframes));
});
frameRateTimer->start(1000);
}
#if defined __unix__ && !defined __HAIKU__
memset(auto_mouse_type, 0, sizeof (auto_mouse_type));
mousedata.mouse_type = getenv("EMU86BOX_MOUSE");