feat(linux-airplay): add option "use legacy ports"

This commit is contained in:
uncor3
2026-04-19 18:51:25 +00:00
parent bc2ac465e9
commit 52c4e65124
6 changed files with 79 additions and 4 deletions
+9
View File
@@ -233,6 +233,11 @@ void SettingsWidget::setupUI()
airplayLayout->addWidget(m_noHoldCheckbox);
#ifdef __linux__
m_useLegacyPortsCheckbox = new QCheckBox("Use legacy ports");
m_useLegacyPortsCheckbox->setToolTip(
"Use legacy AirPlay port behavior for compatibility.");
airplayLayout->addWidget(m_useLegacyPortsCheckbox);
m_showV4L2CheckBox = new QCheckBox("Show V4L2 Button on AirPlay Widget");
airplayLayout->addWidget(m_showV4L2CheckBox);
#endif
@@ -342,6 +347,7 @@ void SettingsWidget::loadSettings()
m_fpsComboBox->setCurrentText(QString::number(sm->airplayFps()));
m_noHoldCheckbox->setChecked(sm->airplayNoHold());
#ifdef __linux__
m_useLegacyPortsCheckbox->setChecked(sm->airplayUseLegacyPorts());
m_showV4L2CheckBox->setChecked(sm->showV4L2());
#endif
@@ -422,6 +428,8 @@ void SettingsWidget::connectSignals()
connect(m_noHoldCheckbox, &QCheckBox::toggled, this,
&SettingsWidget::onSettingChanged);
#ifdef __linux__
connect(m_useLegacyPortsCheckbox, &QCheckBox::toggled, this,
&SettingsWidget::onSettingChanged);
connect(m_showV4L2CheckBox, &QCheckBox::toggled, this,
&SettingsWidget::onSettingChanged);
#endif
@@ -534,6 +542,7 @@ void SettingsWidget::saveSettings()
sm->setAirplayFps(m_fpsComboBox->currentText().toInt());
sm->setAirplayNoHold(m_noHoldCheckbox->isChecked());
#ifdef __linux__
sm->setAirplayUseLegacyPorts(m_useLegacyPortsCheckbox->isChecked());
sm->setShowV4L2(m_showV4L2CheckBox->isChecked());
#endif
m_applyButton->setEnabled(false);