Skip to content

Commit

Permalink
[HACK] Force software video driver on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
RicBent committed Mar 15, 2022
1 parent 96b53ea commit 7c73950
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def add_sys_path(*path_parts):
settings_window,
ease_reset,
retirement,
video_driver_fix,
)


Expand Down
12 changes: 12 additions & 0 deletions src/video_driver_fix.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from anki.utils import isWin
import aqt
from aqt.profiles import VideoDriver


def fix_video_driver():
if isWin:
driver = VideoDriver.Software
aqt.mw.pm.set_video_driver(driver)
# aqt.mw.pm.save() not required, set_video_driver directly writes to a file

fix_video_driver()

0 comments on commit 7c73950

Please sign in to comment.