Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadLibrary path fix #222

Merged
9 changes: 6 additions & 3 deletions caster/asynch/mouse/legion.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from ctypes import *
import getopt
import os
import re
import sys, os
import sys
import threading
from ctypes import *

from dragonfly import monitors

Expand Down Expand Up @@ -161,8 +162,10 @@ def __init__(self):
self.screen_has_changed = False

def setup_dll(self):
import sys
self.tirg_dll = cdll.LoadLibrary(
settings.SETTINGS["paths"]["DLL_PATH"] + "tirg-dll.dll")
(settings.SETTINGS["paths"]["DLL_PATH"] + "tirg-dll.dll").encode(
sys.getfilesystemencoding()))
self.tirg_dll.getTextBBoxesFromFile.argtypes = [c_char_p, c_int, c_int]
self.tirg_dll.getTextBBoxesFromFile.restype = c_char_p
self.tirg_dll.getTextBBoxesFromBytes.argtypes = [c_char_p, c_int, c_int]
Expand Down