0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00

UI: Restart when browser hardware acceleration changed

This commit is contained in:
Matt Gajownik 2020-03-18 21:47:23 +11:00
parent 327a6f599e
commit 4d0f279d08
2 changed files with 5 additions and 1 deletions

View File

@ -2440,6 +2440,7 @@ void OBSBasicSettings::LoadAdvancedSettings()
bool browserHWAccel = config_get_bool(App()->GlobalConfig(), "General",
"BrowserHWAccel");
ui->browserHWAccel->setChecked(browserHWAccel);
prevBrowserAccel = ui->browserHWAccel->isChecked();
#endif
SetComboByValue(ui->hotkeyFocusType, hotkeyFocusType);
@ -3534,8 +3535,10 @@ void OBSBasicSettings::SaveSettings()
bool langChanged = (ui->language->currentIndex() != prevLangIndex);
bool audioRestart = (ui->channelSetup->currentIndex() != channelIndex ||
ui->sampleRate->currentIndex() != sampleRateIndex);
bool browserHWAccelChanged =
(ui->browserHWAccel->isChecked() != prevBrowserAccel);
if (langChanged || audioRestart)
if (langChanged || audioRestart || browserHWAccelChanged)
restart = true;
else
restart = false;

View File

@ -235,6 +235,7 @@ private:
void OnAuthConnected();
QString lastService;
int prevLangIndex;
bool prevBrowserAccel;
private slots:
void UpdateServerList();
void UpdateKeyLink();