mirror of https://github.com/mgba-emu/mgba.git
Qt: Add label with pixel size of high-res upscale
This commit is contained in:
parent
2420fd81e7
commit
4ea82f9e3a
|
@ -569,7 +569,6 @@ void SettingsView::reloadConfig() {
|
||||||
loadSetting("logFile", m_ui.logFile);
|
loadSetting("logFile", m_ui.logFile);
|
||||||
loadSetting("useDiscordPresence", m_ui.useDiscordPresence);
|
loadSetting("useDiscordPresence", m_ui.useDiscordPresence);
|
||||||
loadSetting("gba.audioHle", m_ui.audioHle);
|
loadSetting("gba.audioHle", m_ui.audioHle);
|
||||||
loadSetting("videoScale", m_ui.videoScale, 1);
|
|
||||||
|
|
||||||
m_ui.libraryStyle->setCurrentIndex(loadSetting("libraryStyle").toInt());
|
m_ui.libraryStyle->setCurrentIndex(loadSetting("libraryStyle").toInt());
|
||||||
|
|
||||||
|
@ -636,6 +635,11 @@ void SettingsView::reloadConfig() {
|
||||||
|
|
||||||
int hwaccelVideo = m_controller->getOption("hwaccelVideo", 0).toInt();
|
int hwaccelVideo = m_controller->getOption("hwaccelVideo", 0).toInt();
|
||||||
m_ui.hwaccelVideo->setCurrentIndex(hwaccelVideo);
|
m_ui.hwaccelVideo->setCurrentIndex(hwaccelVideo);
|
||||||
|
|
||||||
|
connect(m_ui.videoScale, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), [this](int value) {
|
||||||
|
m_ui.videoScaleSize->setText(tr("(%1×%2)").arg(GBA_VIDEO_HORIZONTAL_PIXELS * value).arg(GBA_VIDEO_VERTICAL_PIXELS * value));
|
||||||
|
});
|
||||||
|
loadSetting("videoScale", m_ui.videoScale, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsView::saveSetting(const char* key, const QAbstractButton* field) {
|
void SettingsView::saveSetting(const char* key, const QAbstractButton* field) {
|
||||||
|
|
|
@ -907,6 +907,8 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_18">
|
||||||
|
<item>
|
||||||
<widget class="QSpinBox" name="videoScale">
|
<widget class="QSpinBox" name="videoScale">
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string>×</string>
|
<string>×</string>
|
||||||
|
@ -919,6 +921,44 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="videoScaleSize">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>{size}</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in New Issue