Merge pull request #2515 from WizardCM/browser-hwaccel-restart

UI: Restart when browser hardware acceleration changed
master
Jim 2020-03-18 06:13:52 -07:00 committed by GitHub
commit 9b186a47e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();