refresh targets if needed
This commit is contained in:
parent
c4727f0466
commit
7f3561cc43
|
@ -98,6 +98,7 @@ void DiscordPage::javaScriptConsoleMessage(
|
||||||
m_streamDialog.setHidden(false);
|
m_streamDialog.setHidden(false);
|
||||||
else
|
else
|
||||||
m_streamDialog.activateWindow();
|
m_streamDialog.activateWindow();
|
||||||
|
m_streamDialog.updateTargets();
|
||||||
} else if (message == "!discord-screenaudio-stream-stopped") {
|
} else if (message == "!discord-screenaudio-stream-stopped") {
|
||||||
stopVirtmic();
|
stopVirtmic();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -19,10 +19,7 @@ StreamDialog::StreamDialog() : QWidget() {
|
||||||
layout->addWidget(targetLabel);
|
layout->addWidget(targetLabel);
|
||||||
|
|
||||||
m_targetComboBox = new QComboBox;
|
m_targetComboBox = new QComboBox;
|
||||||
m_targetComboBox->addItem("None");
|
updateTargets();
|
||||||
for (auto target : Virtmic::getTargets()) {
|
|
||||||
m_targetComboBox->addItem(target);
|
|
||||||
}
|
|
||||||
layout->addWidget(m_targetComboBox);
|
layout->addWidget(m_targetComboBox);
|
||||||
|
|
||||||
auto qualityLabel = new QLabel;
|
auto qualityLabel = new QLabel;
|
||||||
|
@ -71,3 +68,11 @@ void StreamDialog::startStream() {
|
||||||
m_qualityFPSComboBox->currentData().toUInt());
|
m_qualityFPSComboBox->currentData().toUInt());
|
||||||
setHidden(true);
|
setHidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StreamDialog::updateTargets() {
|
||||||
|
m_targetComboBox->clear();
|
||||||
|
m_targetComboBox->addItem("None");
|
||||||
|
for (auto target : Virtmic::getTargets()) {
|
||||||
|
m_targetComboBox->addItem(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -19,6 +19,9 @@ Q_SIGNALS:
|
||||||
void requestedStreamStart(QString target, uint width, uint height,
|
void requestedStreamStart(QString target, uint width, uint height,
|
||||||
uint frameRate);
|
uint frameRate);
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
void updateTargets();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void startStream();
|
void startStream();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue