frontend: Enable browser hw accel toggle under Linux
This commit is contained in:
parent
e8d1834f68
commit
bdebea3d85
@ -230,11 +230,13 @@ bool OBSApp::InitGlobalConfigDefaults()
|
||||
|
||||
#ifdef _WIN32
|
||||
config_set_default_bool(appConfig, "Audio", "DisableAudioDucking", true);
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
|
||||
config_set_default_bool(appConfig, "General", "BrowserHWAccel", true);
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
config_set_default_bool(appConfig, "General", "BrowserHWAccel", true);
|
||||
config_set_default_bool(appConfig, "Video", "DisableOSXVSync", true);
|
||||
config_set_default_bool(appConfig, "Video", "ResetOSXVSyncOnExit", true);
|
||||
#endif
|
||||
@ -1091,7 +1093,7 @@ bool OBSApp::OBSInit()
|
||||
|
||||
obs_set_ui_task_handler(ui_task_handler);
|
||||
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
|
||||
bool browserHWAccel = config_get_bool(appConfig, "General", "BrowserHWAccel");
|
||||
|
||||
OBSDataAutoRelease settings = obs_data_create();
|
||||
|
@ -530,7 +530,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
#ifdef _WIN32
|
||||
HookWidget(ui->disableAudioDucking, CHECK_CHANGED, ADV_CHANGED);
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
|
||||
HookWidget(ui->browserHWAccel, CHECK_CHANGED, ADV_RESTART);
|
||||
#endif
|
||||
HookWidget(ui->filenameFormatting, EDIT_CHANGED, ADV_CHANGED);
|
||||
@ -618,7 +618,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
delete ui->enableNewSocketLoop;
|
||||
delete ui->enableLowLatencyMode;
|
||||
delete ui->hideOBSFromCapture;
|
||||
#ifdef __linux__
|
||||
#if !defined(__APPLE__) && !defined(__linux__)
|
||||
delete ui->browserHWAccel;
|
||||
delete ui->sourcesGroup;
|
||||
#endif
|
||||
@ -633,7 +633,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
ui->enableNewSocketLoop = nullptr;
|
||||
ui->enableLowLatencyMode = nullptr;
|
||||
ui->hideOBSFromCapture = nullptr;
|
||||
#ifdef __linux__
|
||||
#if !defined(__APPLE__) && !defined(__linux__)
|
||||
ui->browserHWAccel = nullptr;
|
||||
ui->sourcesGroup = nullptr;
|
||||
#endif
|
||||
@ -2593,7 +2593,7 @@ void OBSBasicSettings::LoadAdvancedSettings()
|
||||
ui->enableLowLatencyMode->setChecked(enableLowLatencyMode);
|
||||
ui->enableLowLatencyMode->setToolTip(QTStr("Basic.Settings.Advanced.Network.TCPPacing.Tooltip"));
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
|
||||
bool browserHWAccel = config_get_bool(App()->GetAppConfig(), "General", "BrowserHWAccel");
|
||||
ui->browserHWAccel->setChecked(browserHWAccel);
|
||||
prevBrowserAccel = ui->browserHWAccel->isChecked();
|
||||
@ -3140,7 +3140,7 @@ void OBSBasicSettings::SaveAdvancedSettings()
|
||||
SaveCheckBox(ui->enableNewSocketLoop, "Output", "NewSocketLoopEnable");
|
||||
SaveCheckBox(ui->enableLowLatencyMode, "Output", "LowLatencyEnable");
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
|
||||
bool browserHWAccel = ui->browserHWAccel->isChecked();
|
||||
config_set_bool(App()->GetAppConfig(), "General", "BrowserHWAccel", browserHWAccel);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user