mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-01 21:07:12 -05:00
UI: Enable HW acceleration switch for browser sources on Mac
This enables in Settings the checkbox for hardware acceleration for Browser Sources in MacOs.
This commit is contained in:
@@ -538,6 +538,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
HookWidget(ui->disableAudioDucking, CHECK_CHANGED, ADV_CHANGED);
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
HookWidget(ui->browserHWAccel, CHECK_CHANGED, ADV_RESTART);
|
||||
#endif
|
||||
HookWidget(ui->filenameFormatting, EDIT_CHANGED, ADV_CHANGED);
|
||||
@@ -627,8 +629,10 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
delete ui->advancedGeneralGroupBox;
|
||||
delete ui->enableNewSocketLoop;
|
||||
delete ui->enableLowLatencyMode;
|
||||
#ifdef __linux__
|
||||
delete ui->browserHWAccel;
|
||||
delete ui->sourcesGroup;
|
||||
#endif
|
||||
#if defined(__APPLE__) || HAVE_PULSEAUDIO
|
||||
delete ui->disableAudioDucking;
|
||||
#endif
|
||||
@@ -641,8 +645,10 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
|
||||
ui->advancedGeneralGroupBox = nullptr;
|
||||
ui->enableNewSocketLoop = nullptr;
|
||||
ui->enableLowLatencyMode = nullptr;
|
||||
#ifdef __linux__
|
||||
ui->browserHWAccel = nullptr;
|
||||
ui->sourcesGroup = nullptr;
|
||||
#endif
|
||||
#if defined(__APPLE__) || HAVE_PULSEAUDIO
|
||||
ui->disableAudioDucking = nullptr;
|
||||
#endif
|
||||
@@ -2554,7 +2560,8 @@ void OBSBasicSettings::LoadAdvancedSettings()
|
||||
ui->enableLowLatencyMode->setChecked(enableLowLatencyMode);
|
||||
ui->enableLowLatencyMode->setToolTip(
|
||||
QTStr("Basic.Settings.Advanced.Network.TCPPacing.Tooltip"));
|
||||
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
bool browserHWAccel = config_get_bool(App()->GlobalConfig(), "General",
|
||||
"BrowserHWAccel");
|
||||
ui->browserHWAccel->setChecked(browserHWAccel);
|
||||
@@ -3175,7 +3182,8 @@ void OBSBasicSettings::SaveAdvancedSettings()
|
||||
|
||||
SaveCheckBox(ui->enableNewSocketLoop, "Output", "NewSocketLoopEnable");
|
||||
SaveCheckBox(ui->enableLowLatencyMode, "Output", "LowLatencyEnable");
|
||||
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
bool browserHWAccel = ui->browserHWAccel->isChecked();
|
||||
config_set_bool(App()->GlobalConfig(), "General", "BrowserHWAccel",
|
||||
browserHWAccel);
|
||||
|
||||
Reference in New Issue
Block a user