mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-19 19:55:16 -04:00
UI: Add auto-configuration wizard
The auto-configuration wizard is designed to allow first-time or novice/uneducated users or to set up video and encoding settings in a very quick and easy way. It'll automatically perform a bandwidth test, and/or test the user's video settings to determine the most ideal settings for streaming and recording (assuming a 1-pc setup).
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include "item-widget-helpers.hpp"
|
||||
#include "window-basic-settings.hpp"
|
||||
#include "window-namedialog.hpp"
|
||||
#include "window-basic-auto-config.hpp"
|
||||
#include "window-basic-source-select.hpp"
|
||||
#include "window-basic-main.hpp"
|
||||
#include "window-basic-main-outputs.hpp"
|
||||
@@ -1422,6 +1423,36 @@ void OBSBasic::OBSInit()
|
||||
SystemTray(true);
|
||||
|
||||
OpenSavedProjectors();
|
||||
|
||||
bool has_last_version = config_has_user_value(App()->GlobalConfig(),
|
||||
"General", "LastVersion");
|
||||
bool first_run = config_get_bool(App()->GlobalConfig(), "General",
|
||||
"FirstRun");
|
||||
|
||||
if (!first_run) {
|
||||
config_set_bool(App()->GlobalConfig(), "General", "FirstRun",
|
||||
true);
|
||||
config_save_safe(App()->GlobalConfig(), "tmp", nullptr);
|
||||
}
|
||||
|
||||
if (!first_run && !has_last_version && !Active()) {
|
||||
QString msg;
|
||||
msg = QTStr("Basic.FirstStartup.RunWizard");
|
||||
msg += "\n\n";
|
||||
msg += QTStr("Basic.FirstStartup.RunWizard.BetaWarning");
|
||||
|
||||
QMessageBox::StandardButton button =
|
||||
QMessageBox::question(this, QTStr("Basic.AutoConfig"),
|
||||
msg);
|
||||
|
||||
if (button == QMessageBox::Yes) {
|
||||
on_autoConfigure_triggered();
|
||||
} else {
|
||||
msg = QTStr("Basic.FirstStartup.RunWizard.NoClicked");
|
||||
QMessageBox::information(this,
|
||||
QTStr("Basic.AutoConfig"), msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::InitHotkeys()
|
||||
@@ -3976,6 +4007,7 @@ inline void OBSBasic::OnActivate()
|
||||
{
|
||||
if (ui->profileMenu->isEnabled()) {
|
||||
ui->profileMenu->setEnabled(false);
|
||||
ui->autoConfigure->setEnabled(false);
|
||||
App()->IncrementSleepInhibition();
|
||||
UpdateProcessPriority();
|
||||
|
||||
@@ -3988,6 +4020,7 @@ inline void OBSBasic::OnDeactivate()
|
||||
{
|
||||
if (!outputHandler->Active() && !ui->profileMenu->isEnabled()) {
|
||||
ui->profileMenu->setEnabled(true);
|
||||
ui->autoConfigure->setEnabled(true);
|
||||
App()->DecrementSleepInhibition();
|
||||
ClearProcessPriority();
|
||||
|
||||
@@ -5445,3 +5478,11 @@ void OBSBasic::on_actionPasteFilters_triggered()
|
||||
|
||||
obs_source_copy_filters(dstSource, source);
|
||||
}
|
||||
|
||||
void OBSBasic::on_autoConfigure_triggered()
|
||||
{
|
||||
AutoConfig test(this);
|
||||
test.setModal(true);
|
||||
test.show();
|
||||
test.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user