Merge pull request #324 from MHordecki/software-opengl

Add support for OpenGL software rendering.
This commit is contained in:
Damien Elmes 2019-08-18 20:18:03 +10:00 committed by GitHub
commit 1a1fc35428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -309,6 +309,10 @@ def _run(argv=None, exec=True):
if not os.environ.get("ANKI_NOHIGHDPI"):
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
# Opt into software rendering. Useful for buggy systems.
if os.environ.get("ANKI_SOFTWAREOPENGL"):
QCoreApplication.setAttribute(Qt.AA_UseSoftwareOpenGL)
# create the app
QCoreApplication.setApplicationName("Anki")
QGuiApplication.setDesktopFileName("anki.desktop")