|
|
@@ -6136,6 +6136,37 @@ void OBSBasic::YoutubeStreamCheck(const std::string &key)
|
|
|
|
|
|
youtubeStreamCheckThread->deleteLater();
|
|
|
}
|
|
|
+
|
|
|
+void OBSBasic::ShowYouTubeAutoStartWarning()
|
|
|
+{
|
|
|
+ auto msgBox = []() {
|
|
|
+ QMessageBox msgbox(App()->GetMainWindow());
|
|
|
+ msgbox.setWindowTitle(QTStr(
|
|
|
+ "YouTube.Actions.AutoStartStreamingWarning.Title"));
|
|
|
+ msgbox.setText(
|
|
|
+ QTStr("YouTube.Actions.AutoStartStreamingWarning"));
|
|
|
+ msgbox.setIcon(QMessageBox::Icon::Information);
|
|
|
+ msgbox.addButton(QMessageBox::Ok);
|
|
|
+
|
|
|
+ QCheckBox *cb = new QCheckBox(QTStr("DoNotShowAgain"));
|
|
|
+ msgbox.setCheckBox(cb);
|
|
|
+
|
|
|
+ msgbox.exec();
|
|
|
+
|
|
|
+ if (cb->isChecked()) {
|
|
|
+ config_set_bool(App()->GlobalConfig(), "General",
|
|
|
+ "WarnedAboutYouTubeAutoStart", true);
|
|
|
+ config_save_safe(App()->GlobalConfig(), "tmp", nullptr);
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ bool warned = config_get_bool(App()->GlobalConfig(), "General",
|
|
|
+ "WarnedAboutYouTubeAutoStart");
|
|
|
+ if (!warned) {
|
|
|
+ QMetaObject::invokeMethod(App(), "Exec", Qt::QueuedConnection,
|
|
|
+ Q_ARG(VoidFunc, msgBox));
|
|
|
+ }
|
|
|
+}
|
|
|
#endif
|
|
|
|
|
|
void OBSBasic::StartStreaming()
|
|
|
@@ -6235,12 +6266,8 @@ void OBSBasic::StartStreaming()
|
|
|
if (replayBufferWhileStreaming)
|
|
|
StartReplayBuffer();
|
|
|
|
|
|
- if (!autoStartBroadcast) {
|
|
|
- OBSMessageBox::warning(
|
|
|
- this, "Warning",
|
|
|
- QTStr("YouTube.Actions.AutoStartStreamingWarning"),
|
|
|
- false);
|
|
|
- }
|
|
|
+ if (!autoStartBroadcast)
|
|
|
+ OBSBasic::ShowYouTubeAutoStartWarning();
|
|
|
}
|
|
|
|
|
|
void OBSBasic::BroadcastButtonClicked()
|