From 6377dd161f24dc26fee368113b11ace001ff02af Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 1 Aug 2016 12:16:06 +1000 Subject: [PATCH] fix mesa driver being loaded on nvidia driver machines --- aqt/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aqt/__init__.py b/aqt/__init__.py index e8e189ce8..62c8695e4 100644 --- a/aqt/__init__.py +++ b/aqt/__init__.py @@ -15,7 +15,7 @@ from aqt.qt import * import anki.lang from anki.consts import HELP_SITE from anki.lang import langDir -from anki.utils import isMac +from anki.utils import isMac, isLin appVersion=_version appWebsite="http://ankisrs.net/" @@ -212,6 +212,11 @@ def _run(): rd = os.path.abspath(moduleDir + "/../../../plugins") QCoreApplication.setLibraryPaths([rd]) + # work around pyqt loading wrong GL library + if isLin: + import ctypes + ctypes.CDLL('libGL.so.1', ctypes.RTLD_GLOBAL) + # create the app app = AnkiApp(sys.argv) QCoreApplication.setApplicationName("Anki")