UI: Hide OpenGL and D3D adapter on Windows

OpenGL on Windows is rather unstable and can result in graphical
corruption or the complete inability to start OBS since some GPUs do not
support the minimum requirements after switching to OpenGL. The UI option
is now hidden unless --allow-opengl is passed on the command line.

The D3D adapter is currently unused and we often find users are concerned
when their GPU does not appear in the list.
This commit is contained in:
Richard Stanway 2017-04-10 15:52:53 +02:00
commit fdc9c47875
No known key found for this signature in database
GPG key ID: AAC1E5265D71B3FD
3 changed files with 15 additions and 7 deletions

View file

@ -1041,18 +1041,20 @@ void OBSBasicSettings::LoadRendererList()
"Renderer");
ui->renderer->addItem(QT_UTF8("Direct3D 11"));
ui->renderer->addItem(QT_UTF8("OpenGL"));
if (opt_allow_opengl)
ui->renderer->addItem(QT_UTF8("OpenGL"));
int idx = ui->renderer->findText(QT_UTF8(renderer));
if (idx == -1)
idx = 0;
if (strcmp(renderer, "OpenGL") == 0) {
delete ui->adapter;
delete ui->adapterLabel;
ui->adapter = nullptr;
ui->adapterLabel = nullptr;
}
// the video adapter selection is not currently implemented, hide for now
// to avoid user confusion. was previously protected by
// if (strcmp(renderer, "OpenGL") == 0)
delete ui->adapter;
delete ui->adapterLabel;
ui->adapter = nullptr;
ui->adapterLabel = nullptr;
ui->renderer->setCurrentIndex(idx);
#endif