diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-05 19:36:29 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-05 19:36:29 +0200 |
commit | 1f928c3d0a0ccf32b304db3607f71c0da1f95733 (patch) | |
tree | c0496e18d233c995bd3afb694686ac681d30bc40 /src/monitor.py | |
parent | m doc (diff) | |
download | blueshift-1f928c3d0a0ccf32b304db3607f71c0da1f95733.tar.gz blueshift-1f928c3d0a0ccf32b304db3607f71c0da1f95733.tar.bz2 blueshift-1f928c3d0a0ccf32b304db3607f71c0da1f95733.tar.xz |
remove crtc parameter from C and Cython functions for VidMode
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/monitor.py')
-rw-r--r-- | src/monitor.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/monitor.py b/src/monitor.py index e58836b..e94c1e8 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -105,7 +105,7 @@ def vidmode_get(crtc = 0, screen = 0, display = None): ''' Gets the current colour curves using the X11 extension VidMode - @param crtc:int The CRTC of the monitor to read from + @param crtc:int The CRTC of the monitor to read from, dummy parameter @param screen:int The screen to which the monitors belong @param display:str? The display to which to connect, `None` for current display @return :()→void Function to invoke to apply the curves that was used when this function was invoked @@ -123,7 +123,7 @@ def vidmode_get(crtc = 0, screen = 0, display = None): else: raise Exception('Cannot open vidmode connection') # Read current curves and create function - return ramps_to_function(*(vidmode_read(crtc))) + return ramps_to_function(*(vidmode_read())) def drm_get(crtc = 0, screen = 0, display = None): @@ -178,15 +178,12 @@ def vidmode(*crtcs, screen = 0, display = None): ''' Applies colour curves using the X11 extension VidMode - @param crtcs:*int The CRT controllers to use, all are used if none are specified + @param crtcs:*int The CRT controllers to use, all are used if none are specified, dummy parameter @param screen:int The screen to which the monitors belong @param display:str? The display to which to connect, `None` for current display ''' from blueshift_vidmode import vidmode_open, vidmode_apply, vidmode_close global vidmode_opened - # Select CRTC:s - crtcs = sum([1 << i for i in crtcs]) if len(crtcs) > 0 else ((1 << 64) - 1) - # Convert curves to [0, 0xFFFF] integer lists (R_curve, G_curve, B_curve) = translate_to_integers() # Open new vidmode connection if non is open or one is open to the wrong screen or display @@ -201,7 +198,7 @@ def vidmode(*crtcs, screen = 0, display = None): raise Exception('Cannot open vidmode connection') try: # Apply adjustments - if not vidmode_apply(crtcs, R_curve, G_curve, B_curve) == 0: + if not vidmode_apply(R_curve, G_curve, B_curve) == 0: raise Exception('Cannot use vidmode to apply colour adjustments') except OverflowError: pass # Happens on exit by TERM signal |