blob: 525b075f22120cf845a2ff8e97788833a19b2aea [file] [log] [blame]
From 47fb64c4ed657bf71579c03fc452129ae8292b88 Mon Sep 17 00:00:00 2001
From: Dennis Kempin <denniskempin@chromium.org>
Date: Thu, 7 Jun 2012 13:53:48 -0700
Subject: [PATCH 2/2] Added absinfo.resolution to file format
This change will update the file format to include the resolution
field when serializing absinfo structures.
The read code allows the resolution field to be option to stay
compatible with old files
---
src/evemu.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/evemu.c b/src/evemu.c
index 8501933..29a2c69 100644
--- a/src/evemu.c
+++ b/src/evemu.c
@@ -234,8 +234,9 @@ static void write_mask(FILE * fp, int index,
static void write_abs(FILE *fp, int index, const struct input_absinfo *abs)
{
- fprintf(fp, "A: %02x %d %d %d %d\n", index,
- abs->minimum, abs->maximum, abs->fuzz, abs->flat);
+ fprintf(fp, "A: %02x %d %d %d %d %d\n", index,
+ abs->minimum, abs->maximum, abs->fuzz, abs->flat,
+ abs->resolution);
}
int evemu_write(const struct evemu_device *dev, FILE *fp)
@@ -288,8 +289,8 @@ static void read_abs(struct evemu_device *dev, FILE *fp)
{
struct input_absinfo abs = {0};
int index;
- while (fscanf(fp, "A: %02x %d %d %d %d\n", &index,
- &abs.minimum, &abs.maximum, &abs.fuzz, &abs.flat) > 0)
+ while (fscanf(fp, "A: %02x %d %d %d %d %d\n", &index, &abs.minimum,
+ &abs.maximum, &abs.fuzz, &abs.flat, &abs.resolution) > 0)
dev->abs[index] = abs;
}
--
1.7.7.3