UI: Add adv. settings checkbox for browser HW accel

Adds a checkbox to advanced settings that allows the user to
enable/disable browser source hardware acceleration on windows.
This commit is contained in:
jp9000 2018-08-10 06:12:16 -07:00
commit 4d38e054e3
5 changed files with 118 additions and 40 deletions

View file

@ -437,6 +437,7 @@ bool OBSApp::InitGlobalConfigDefaults()
#ifdef _WIN32
config_set_default_bool(globalConfig, "Audio", "DisableAudioDucking",
true);
config_set_default_bool(globalConfig, "General", "BrowserHWAccel", true);
#endif
#ifdef __APPLE__
@ -1226,6 +1227,19 @@ bool OBSApp::OBSInit()
if (!StartupOBS(locale.c_str(), GetProfilerNameStore()))
return false;
#ifdef _WIN32
bool browserHWAccel = config_get_bool(globalConfig, "General",
"BrowserHWAccel");
obs_data_t *settings = obs_data_create();
obs_data_set_bool(settings, "BrowserHWAccel", browserHWAccel);
obs_apply_private_data(settings);
obs_data_release(settings);
blog(LOG_INFO, "Browser Hardware Acceleration: %s",
browserHWAccel ? "true" : "false");
#endif
blog(LOG_INFO, "Portable mode: %s",
portable_mode ? "true" : "false");