mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
default to software rendering on Windows/Linux
This commit is contained in:
parent
65f6ddf8d9
commit
099bd045d0
1 changed files with 9 additions and 0 deletions
|
@ -223,6 +223,8 @@ def parseArgs(argv):
|
|||
parser.add_option("-b", "--base", help="path to base folder")
|
||||
parser.add_option("-p", "--profile", help="profile name to load")
|
||||
parser.add_option("-l", "--lang", help="interface language (en, de, etc)")
|
||||
if not isMac:
|
||||
parser.add_option("--hwaccel", action="store_true", help="enable hardware acceleration")
|
||||
return parser.parse_args(argv[1:])
|
||||
|
||||
def run():
|
||||
|
@ -253,6 +255,13 @@ def _run(argv=None, exec=True):
|
|||
opts.base = opts.base or ""
|
||||
opts.profile = opts.profile or ""
|
||||
|
||||
if not isMac and not opts.hwaccel:
|
||||
print("Hardware acceleration disabled.")
|
||||
if isWin:
|
||||
os.environ["QT_OPENGL"] = "software"
|
||||
else:
|
||||
os.environ["QT_XCB_FORCE_SOFTWARE_OPENGL"] = "1"
|
||||
|
||||
# work around pyqt loading wrong GL library
|
||||
if isLin:
|
||||
import ctypes
|
||||
|
|
Loading…
Reference in a new issue