mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
macOS: use software backend by default with Qt6
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7bd17a1784
commit
baf23fd681
1 changed files with 7 additions and 0 deletions
|
@ -128,6 +128,13 @@ int main(int argc, char **argv)
|
||||||
void validateGL()
|
void validateGL()
|
||||||
{
|
{
|
||||||
QString quickBackend = qgetenv("QT_QUICK_BACKEND");
|
QString quickBackend = qgetenv("QT_QUICK_BACKEND");
|
||||||
|
/* on macOS with Qt6 (maybe others), things only work with the software backend */
|
||||||
|
#if defined(Q_OS_MACOS) && QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
if (quickBackend.isEmpty()) {
|
||||||
|
quickBackend = QStringLiteral("software");
|
||||||
|
qputenv("QT_QUICK_BACKEND", "software");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* an empty QT_QUICK_BACKEND env. variable means OpenGL (default).
|
/* an empty QT_QUICK_BACKEND env. variable means OpenGL (default).
|
||||||
* only validate OpenGL; for everything else print out and return.
|
* only validate OpenGL; for everything else print out and return.
|
||||||
* https://doc.qt.io/qt-5/qtquick-visualcanvas-adaptations.html
|
* https://doc.qt.io/qt-5/qtquick-visualcanvas-adaptations.html
|
||||||
|
|
Loading…
Reference in a new issue