mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
desktop-main.cpp: don't validate for custom backends
Without this patch the user can pass a custom backend like 'software' and the validation will still be performed. In a case where the validation fails Subsurface will still exit. With this patch the validation is performed *only* for the standard backend which is OpenGL (or an empty QT_QUICK_BACKEND) env. variable. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
68c2b10161
commit
945a0a8748
1 changed files with 12 additions and 0 deletions
|
@ -140,6 +140,18 @@ bool haveFilesOnCommandLine()
|
||||||
|
|
||||||
void validateGL()
|
void validateGL()
|
||||||
{
|
{
|
||||||
|
QString quickBackend = qgetenv("QT_QUICK_BACKEND");
|
||||||
|
/* an empty QT_QUICK_BACKEND env. variable means OpenGL (default).
|
||||||
|
* only validate OpenGL; for everything else print out and return.
|
||||||
|
* https://doc.qt.io/qt-5/qtquick-visualcanvas-adaptations.html
|
||||||
|
*/
|
||||||
|
if (!quickBackend.isEmpty()) {
|
||||||
|
if (verbose) {
|
||||||
|
qDebug() << QStringLiteral(VALIDATE_GL_PREFIX "'QT_QUICK_BACKEND' is set to '%1'. "
|
||||||
|
"Skipping validation.").arg(quickBackend).toUtf8().data();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
GLint verMajor, verMinor;
|
GLint verMajor, verMinor;
|
||||||
const char *glError = NULL;
|
const char *glError = NULL;
|
||||||
QOpenGLContext ctx;
|
QOpenGLContext ctx;
|
||||||
|
|
Loading…
Add table
Reference in a new issue