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 committed 2017-04-10 15:54:51 +02:00
1 parent bda50fb439
commit fdc9c47875
3 files changed
+15 -7

No files matched your search

+9 -7
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