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