Merge branch '86Box:master' into pot-po-vmmupd
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user