aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.c b/main.c
index e29f192..229e91d 100644
--- a/main.c
+++ b/main.c
@@ -278,29 +278,29 @@ int main(int argc, char ** argv) {
}
if (fd == -1 && errno == ENOENT) {
- printf("No such file or directory: %s\n", cfg -> device);
+ printf("Invalid device, please check your config file.\n");
return -1;
}
init_key_names();
- void( * fp)(struct input_event * ie) = (cfg -> enable_time == true) ? print_with_time : print_pure;
+ void( * fp)(struct input_event * ie) = (cfg -> time == true) ? print_with_time : print_pure;
while (1) {
read(fd, & ie, sizeof(ie));
if (ie.type == EV_KEY) {
if (ie.value == KEY_PRESS) {
- if (line_lock != -1 && !cfg -> enable_time) printf("\n");
+ if (line_lock != -1 && !cfg -> time) printf("\n");
repeat_counters[ie.code] = 1;
line_lock = ie.code;
fp(&ie);
}
if (ie.value == KEY_REPEAT) {
- if (cfg->enable_time) {
- if (cfg->enable_time) printf("\r\033[K");
+ if (cfg->time) {
+ if (cfg->time) printf("\r\033[K");
}
line_lock = ie.code;
repeat_counters[ie.code]++;