mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Make service settings use OK/Apply/Cancel
Currently service settings are updated in real time via the properties view, which means that OK/Cancel/Apply have no effect. This fixes that by using the new type of properties view that operates only on settings data, not an object.
This commit is contained in:
@@ -326,6 +326,11 @@ bool OBSBasic::LoadService()
|
||||
{
|
||||
const char *type;
|
||||
|
||||
if (service) {
|
||||
obs_service_destroy(service);
|
||||
service = nullptr;
|
||||
}
|
||||
|
||||
char serviceJsonPath[512];
|
||||
int ret = os_get_config_path(serviceJsonPath, sizeof(serviceJsonPath),
|
||||
SERVICE_PATH);
|
||||
@@ -658,7 +663,6 @@ void OBSBasic::SaveProject()
|
||||
if (ret <= 0)
|
||||
return;
|
||||
|
||||
SaveService();
|
||||
Save(savePath);
|
||||
}
|
||||
|
||||
@@ -1330,6 +1334,13 @@ void OBSBasic::SetService(obs_service_t *newService)
|
||||
}
|
||||
}
|
||||
|
||||
bool OBSBasic::StreamingActive()
|
||||
{
|
||||
if (!outputHandler)
|
||||
return false;
|
||||
return outputHandler->StreamingActive();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define IS_WIN32 1
|
||||
#else
|
||||
@@ -2237,8 +2248,6 @@ void OBSBasic::on_streamButton_clicked()
|
||||
if (outputHandler->StreamingActive()) {
|
||||
outputHandler->StopStreaming();
|
||||
} else {
|
||||
SaveService();
|
||||
|
||||
if (outputHandler->StartStreaming(service)) {
|
||||
ui->streamButton->setEnabled(false);
|
||||
ui->streamButton->setText(
|
||||
|
||||
Reference in New Issue
Block a user