Indicate interlaced modes in status bar
This commit is contained in:
@@ -139,6 +139,7 @@ typedef struct monitor_t {
|
||||
int mon_cga_palette_static; /* Whether it should not be freed by the API. */
|
||||
const video_timings_t *mon_vid_timings;
|
||||
int mon_vid_type;
|
||||
atomic_bool mon_interlace;
|
||||
struct blit_data_struct *mon_blit_data_ptr;
|
||||
} monitor_t;
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
frameRateTimer->setInterval(1000);
|
||||
frameRateTimer->setSingleShot(false);
|
||||
connect(frameRateTimer, &QTimer::timeout, [this, hertz_label] {
|
||||
hertz_label->setText(tr("%1 Hz").arg(monitors[0].mon_actualrenderedframes.load()));
|
||||
hertz_label->setText(tr("%1 Hz").arg(QString::number(monitors[0].mon_actualrenderedframes.load()) + (monitors[0].mon_interlace ? "i" : "")));
|
||||
});
|
||||
statusBar()->addPermanentWidget(hertz_label);
|
||||
frameRateTimer->start(1000);
|
||||
|
||||
@@ -105,7 +105,7 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index)
|
||||
frameRateTimer->setSingleShot(false);
|
||||
frameRateTimer->setInterval(1000);
|
||||
connect(frameRateTimer, &QTimer::timeout, [this] {
|
||||
this->setWindowTitle(QObject::tr("86Box Monitor #") + QString::number(m_monitor_index + 1) + QString(" - ") + tr("%1 Hz").arg(monitors[m_monitor_index].mon_actualrenderedframes.load()));
|
||||
this->setWindowTitle(QObject::tr("86Box Monitor #") + QString::number(m_monitor_index + 1) + QString(" - ") + tr("%1 Hz").arg(QString::number(monitors[m_monitor_index].mon_actualrenderedframes.load()) + (monitors[m_monitor_index].mon_interlace ? "i" : "")));
|
||||
});
|
||||
frameRateTimer->start(1000);
|
||||
}
|
||||
|
||||
@@ -1146,6 +1146,7 @@ svga_recalctimings(svga_t *svga)
|
||||
if (dev->dispofftime < TIMER_USEC)
|
||||
dev->dispofftime = TIMER_USEC;
|
||||
|
||||
svga->monitor->mon_interlace = !!dev->interlace;
|
||||
ibm8514_set_poll(svga);
|
||||
} else
|
||||
svga_set_poll(svga);
|
||||
@@ -1164,6 +1165,7 @@ svga_recalctimings(svga_t *svga)
|
||||
if (xga->dispofftime < TIMER_USEC)
|
||||
xga->dispofftime = TIMER_USEC;
|
||||
|
||||
svga->monitor->mon_interlace = !!xga->interlace;
|
||||
xga_set_poll(svga);
|
||||
} else
|
||||
svga_set_poll(svga);
|
||||
@@ -1182,6 +1184,7 @@ svga_recalctimings(svga_t *svga)
|
||||
if (dev->dispofftime < TIMER_USEC)
|
||||
dev->dispofftime = TIMER_USEC;
|
||||
|
||||
svga->monitor->mon_interlace = !!dev->interlace;
|
||||
ibm8514_set_poll(svga);
|
||||
} else if (xga->on) {
|
||||
_dispofftime_xga = disptime_xga - _dispontime_xga;
|
||||
@@ -1195,6 +1198,7 @@ svga_recalctimings(svga_t *svga)
|
||||
if (xga->dispofftime < TIMER_USEC)
|
||||
xga->dispofftime = TIMER_USEC;
|
||||
|
||||
svga->monitor->mon_interlace = !!xga->interlace;
|
||||
xga_set_poll(svga);
|
||||
} else
|
||||
svga_set_poll(svga);
|
||||
@@ -1247,6 +1251,10 @@ svga_recalctimings(svga_t *svga)
|
||||
else
|
||||
svga->hdisp >>= 1;
|
||||
}
|
||||
|
||||
svga->monitor->mon_interlace = 0;
|
||||
if (!svga->override && svga->interlace)
|
||||
svga->monitor->mon_interlace = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -332,6 +332,8 @@ video_prepare(void)
|
||||
/* Do an inform on the default values, so that that there's some sane values initialized
|
||||
even if the device init function does not do an inform of its own. */
|
||||
video_inform_monitor(VIDEO_FLAG_TYPE_SPECIAL, &timing_default, i);
|
||||
|
||||
monitors[i].mon_interlace = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user