diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2011-01-10 18:04:34 +0100 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2011-01-10 18:04:34 +0100 |
commit | cc6902cff106e97d569385fc0af8779e26b2eb4a (patch) | |
tree | 292d7e895cadf0ebf17929af6d98ad1ba1151501 | |
parent | e41f3eb103c9e4c568151f9ef1703a69016548e5 (diff) |
break no longer in right context -> skip and fix bug
-rw-r--r-- | src/frame-xi2.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/frame-xi2.c b/src/frame-xi2.c index c10aee9..6a5eac0 100644 --- a/src/frame-xi2.c +++ b/src/frame-xi2.c @@ -91,16 +91,16 @@ static void init_valuators(utouch_frame_handle fh, set_field(fh, name, v->number, ABS_MT_POSITION_X) { s->min_x = v->min; s->max_x = v->max; - if (v->resolution <= 0) - break; - s->phys_width = (v->max - v->min) / v->resolution; + if (v->resolution > 0) + s->phys_width = (v->max - v->min) / + v->resolution; } set_field(fh, name, v->number, ABS_MT_POSITION_Y) { s->min_y = v->min; s->max_y = v->max; - if (v->resolution <= 0) - break; - s->phys_height = (v->max - v->min) / v->resolution; + if (v->resolution > 0) + s->phys_height = (v->max - v->min) / + v->resolution; } set_field(fh, name, v->number, ABS_MT_TOUCH_MAJOR) { s->use_touch_major = 1; @@ -121,9 +121,8 @@ static void init_valuators(utouch_frame_handle fh, set_field(fh, name, v->number, ABS_MT_PRESSURE) { s->use_pressure = 1; s->max_pressure = v->max > 0 ? v->max : 256; - if (v->resolution <= 0) - break; - s->phys_pressure = v->max / v->resolution; + if (v->resolution > 0) + s->phys_pressure = v->max / v->resolution; } #ifdef ABS_MT_DISTANCE set_field(fh, name, v->number, ABS_MT_DISTANCE) { |