UI: Hide network features if a non-RTMP service is set

Reimplementation of bc80d0c and f2e6122, because they have to be
reverted by 0b9a8aa.
This commit is contained in:
tytan652
2022-07-19 07:44:12 +02:00
committed by Jim
parent 57c9844f15
commit fc7af80f84
5 changed files with 57 additions and 7 deletions

View File

@@ -939,6 +939,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
SLOT(UseStreamKeyAdvClicked()));
UpdateAudioWarnings();
UpdateAdvNetworkGroup();
}
OBSBasicSettings::~OBSBasicSettings()
@@ -5472,3 +5473,18 @@ void OBSBasicSettings::RecreateOutputResolutionWidget()
ui->outputResolution->lineEdit()->setValidator(
ui->baseResolution->lineEdit()->validator());
}
void OBSBasicSettings::UpdateAdvNetworkGroup()
{
bool enabled = IsServiceOutputHasNetworkFeatures();
ui->advNetworkDisabled->setVisible(!enabled);
ui->bindToIPLabel->setVisible(enabled);
ui->bindToIP->setVisible(enabled);
ui->dynBitrate->setVisible(enabled);
#ifdef _WIN32
ui->enableNewSocketLoop->setVisible(enabled);
ui->enableLowLatencyMode->setVisible(enabled);
#endif
}