mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Add support for OpenGL software rendering.
In some systems, the default Qt hardware renderer is buggy. There's a Qt option for forcing software rendering. This commit adds support for a new environment variable, ANKI_SOFTWAREOPENGL, that, when set, will prompt Anki to force software OpenGL in Qt.
This commit is contained in:
parent
c4eca03dd8
commit
8617ec7250
1 changed files with 4 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue