diff --git a/black_screen_dim.py b/black_screen_dim.py index 5151e5b..66e16df 100644 --- a/black_screen_dim.py +++ b/black_screen_dim.py @@ -66,7 +66,7 @@ class BrightnessController: def _open_physical(self, hmon): dx = ctypes.windll.dxva2 arr = (BrightnessController.PHYSICAL_MONITOR * 1)() - if not dx.GetPhysicalMonitorsFromHMONITOR(int(hmon), 1, ctypes.byref(arr)): + if not dx.GetPhysicalMonitorsFromHMONITOR(int(hmon), 1, arr): return None return arr[0].hPhysicalMonitor @@ -89,7 +89,7 @@ class BrightnessController: dx = ctypes.windll.dxva2 arr = (BrightnessController.PHYSICAL_MONITOR * 1)() arr[0].hPhysicalMonitor = handle - dx.DestroyPhysicalMonitors(1, ctypes.byref(arr)) + dx.DestroyPhysicalMonitors(1, arr) def _build(self): self.targets = []