mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
UI: Set preferHardware only when hw encoder is avail.
streamPage->ui->preferHardware doesn't exist if hw encoder is not available Closes obsproject/obs-studio#1665
This commit is contained in:
parent
1f317fb80a
commit
ed0908567c
@ -818,14 +818,15 @@ AutoConfig::AutoConfig(QWidget *parent)
|
||||
if (!hardwareEncodingAvailable) {
|
||||
delete streamPage->ui->preferHardware;
|
||||
streamPage->ui->preferHardware = nullptr;
|
||||
} else {
|
||||
/* Newer generations of NVENC have a high enough quality to
|
||||
* bitrate ratio that if NVENC is available, it makes sense to
|
||||
* just always prefer hardware encoding by default */
|
||||
bool preferHardware = nvencAvailable ||
|
||||
os_get_physical_cores() <= 4;
|
||||
streamPage->ui->preferHardware->setChecked(preferHardware);
|
||||
}
|
||||
|
||||
/* Newer generations of NVENC have a high enough quality to bitrate
|
||||
* ratio that if NVENC is available, it makes sense to just always
|
||||
* prefer hardware encoding by default */
|
||||
bool preferHardware = nvencAvailable || os_get_physical_cores() <= 4;
|
||||
streamPage->ui->preferHardware->setChecked(preferHardware);
|
||||
|
||||
setOptions(0);
|
||||
setButtonText(QWizard::FinishButton,
|
||||
QTStr("Basic.AutoConfig.ApplySettings"));
|
||||
|
Loading…
Reference in New Issue
Block a user