summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--src/blueshift_iccprofile.c6
-rw-r--r--src/icc.py8
3 files changed, 10 insertions, 6 deletions
diff --git a/TODO b/TODO
index 74950cf..f84b8b9 100644
--- a/TODO
+++ b/TODO
@@ -3,7 +3,7 @@ High priority:
Add models for calculating fade and refresh rate parameters
Medium priority:
- Test and demo _ICC_PROFILE
+ Demo _ICC_PROFILE
Demo functionise
Low priority:
diff --git a/src/blueshift_iccprofile.c b/src/blueshift_iccprofile.c
index cc58ac2..ef04701 100644
--- a/src/blueshift_iccprofile.c
+++ b/src/blueshift_iccprofile.c
@@ -127,17 +127,17 @@ int main(int argc, char** argv)
/* Check property name pattern */
- if (!strcmp(name, "_icc_profile"))
+ if (!strcasecmp(name, "_icc_profile"))
monitor = 0;
else if (strcasestr(name, "_icc_profile_") == name)
{
name += strlen("_icc_profile_");
monitor = 0;
- if (*name)
+ if (*name == '\0')
continue;
while (*name)
{
- char c = *name;
+ char c = *name++;
if (('0' <= c) && (c <= '9'))
monitor = monitor * 10 - (c & 15);
else
diff --git a/src/icc.py b/src/icc.py
index df77a52..e08dfa7 100644
--- a/src/icc.py
+++ b/src/icc.py
@@ -19,6 +19,10 @@ from subprocess import Popen, PIPE
from curve import *
+# /usr/libexec
+LIBEXECDIR = 'bin'
+
+
def load_icc(pathname):
'''
@@ -58,9 +62,9 @@ def get_current_icc_raw():
for line in lines:
if len(line) == 0:
continue
- (s, m, p) = lines.split(': ')
+ (s, m, p) = line.split(': ')
p = bytes([int(p[i : i + 2], 16) for i in range(0, len(p), 2)])
- rc.append((s, m, p))
+ rc.append((int(s), int(m), p))
return rc