Only import glfw on demand
This commit is contained in:
parent
e1017929c4
commit
3f93b5353e
1 changed files with 1 additions and 2 deletions
|
|
@ -15,8 +15,6 @@
|
|||
from functools import lru_cache
|
||||
from time import monotonic
|
||||
|
||||
import glfw
|
||||
|
||||
from .constants import terminfo_dir
|
||||
|
||||
libc = ctypes.CDLL(None)
|
||||
|
|
@ -127,6 +125,7 @@ def get_logical_dpi():
|
|||
|
||||
|
||||
def get_dpi():
|
||||
import glfw
|
||||
if not hasattr(get_dpi, 'ans'):
|
||||
m = glfw.glfwGetPrimaryMonitor()
|
||||
width, height = glfw.glfwGetMonitorPhysicalSize(m)
|
||||
|
|
|
|||
Loading…
Reference in a new issue