mirror of https://github.com/mgba-emu/mgba.git
Qt: Add settings for enhancements
This commit is contained in:
parent
8450417086
commit
bdc4e2837d
|
@ -401,6 +401,7 @@ void SettingsView::updateConfig() {
|
|||
saveSetting("logToStdout", m_ui.logToStdout);
|
||||
saveSetting("logFile", m_ui.logFile);
|
||||
saveSetting("useDiscordPresence", m_ui.useDiscordPresence);
|
||||
saveSetting("audioHle", m_ui.audioHle);
|
||||
|
||||
if (m_ui.fastForwardUnbounded->isChecked()) {
|
||||
saveSetting("fastForwardRatio", "-1");
|
||||
|
@ -465,6 +466,14 @@ void SettingsView::updateConfig() {
|
|||
emit languageChanged();
|
||||
}
|
||||
|
||||
int videoScale = m_controller->getOption("videoScale").toInt();
|
||||
int hwaccelVideo = m_controller->getOption("hwaccelVideo").toInt();
|
||||
if (videoScale != m_ui.videoScale->value() || hwaccelVideo != m_ui.hwaccelVideo->currentIndex()) {
|
||||
emit videoRendererChanged();
|
||||
}
|
||||
saveSetting("videoScale", m_ui.videoScale);
|
||||
saveSetting("hwaccelVideo", m_ui.hwaccelVideo->currentIndex());
|
||||
|
||||
m_logModel.save(m_controller);
|
||||
m_logModel.logger()->setLogFile(m_ui.logFile->text());
|
||||
m_logModel.logger()->logToFile(m_ui.logToFile->isChecked());
|
||||
|
@ -541,6 +550,8 @@ void SettingsView::reloadConfig() {
|
|||
loadSetting("logToStdout", m_ui.logToStdout);
|
||||
loadSetting("logFile", m_ui.logFile);
|
||||
loadSetting("useDiscordPresence", m_ui.useDiscordPresence);
|
||||
loadSetting("audioHle", m_ui.audioHle);
|
||||
loadSetting("videoScale", m_ui.videoScale);
|
||||
|
||||
m_ui.libraryStyle->setCurrentIndex(loadSetting("libraryStyle").toInt());
|
||||
|
||||
|
@ -604,6 +615,12 @@ void SettingsView::reloadConfig() {
|
|||
m_ui.cgbModel->setCurrentIndex(index >= 0 ? index : 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
int hwaccelVideo = m_controller->getOption("hwaccelVideo", 1).toInt();
|
||||
if (hwaccelVideo < 1) {
|
||||
hwaccelVideo = 1;
|
||||
}
|
||||
m_ui.hwaccelVideo->setCurrentIndex(hwaccelVideo);
|
||||
}
|
||||
|
||||
void SettingsView::saveSetting(const char* key, const QAbstractButton* field) {
|
||||
|
|
|
@ -40,6 +40,7 @@ signals:
|
|||
void displayDriverChanged();
|
||||
void cameraDriverChanged();
|
||||
void cameraChanged(const QByteArray&);
|
||||
void videoRendererChanged();
|
||||
void pathsChanged();
|
||||
void languageChanged();
|
||||
void libraryCleared();
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>588</width>
|
||||
<height>488</height>
|
||||
<width>790</width>
|
||||
<height>686</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -33,14 +33,14 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QListWidget" name="tabs">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
|
@ -62,6 +62,11 @@
|
|||
<string>Emulation</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Enhancements</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>BIOS</string>
|
||||
|
@ -844,6 +849,70 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="enhancements">
|
||||
<layout class="QFormLayout" name="formLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_36">
|
||||
<property name="text">
|
||||
<string>Video renderer:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="hwaccelVideo">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Software</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>OpenGL</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="oglEnahance">
|
||||
<property name="title">
|
||||
<string>OpenGL enhancements</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_7">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_37">
|
||||
<property name="text">
|
||||
<string>High-resolution scale:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="videoScale">
|
||||
<property name="suffix">
|
||||
<string>×</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>13</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="audioHle">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>XQ GBA audio (experimental)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="bios">
|
||||
<layout class="QFormLayout" name="formLayout_5">
|
||||
<item row="0" column="0">
|
||||
|
@ -1221,12 +1290,12 @@
|
|||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTableView" name="loggingView">
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>77</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>0</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>77</number>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
|
|
@ -460,6 +460,7 @@ void Window::openSettingsWindow() {
|
|||
connect(settingsWindow, &SettingsView::audioDriverChanged, this, &Window::reloadAudioDriver);
|
||||
connect(settingsWindow, &SettingsView::cameraDriverChanged, this, &Window::mustRestart);
|
||||
connect(settingsWindow, &SettingsView::cameraChanged, &m_inputController, &InputController::setCamera);
|
||||
connect(settingsWindow, &SettingsView::videoRendererChanged, this, &Window::mustRestart);
|
||||
connect(settingsWindow, &SettingsView::languageChanged, this, &Window::mustRestart);
|
||||
connect(settingsWindow, &SettingsView::pathsChanged, this, &Window::reloadConfig);
|
||||
#ifdef USE_SQLITE3
|
||||
|
|
Loading…
Reference in New Issue