diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-03-10 14:18:13 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-03-11 09:27:57 +1000 |
commit | 90ba05056578405307e737620782a581b942ef62 (patch) | |
tree | 10fa941b6716efb8c795640ba4f4470524c2029f /test | |
parent | 1023572644c5f00a418043615e802484fcff6e71 (diff) |
Change signature of wcmTilt2R to return the rotation calculated.
Take an input point, calculate the rotation and return it. No need to deal
with device state structures, etc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pinglinux@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/wacom-tests.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/wacom-tests.c b/test/wacom-tests.c index 841bcdb..8444bf3 100644 --- a/test/wacom-tests.c +++ b/test/wacom-tests.c @@ -416,15 +416,15 @@ test_tilt_to_rotation(void) { -69, 997, 45}, { -52, 998, 40}, { -34, 999, 35}, { -17, 999, 30}, }; int i; - WacomDeviceState ds = {0}; for (i = 0; i < ARRAY_SIZE(rotation_table); i++) { - ds.rotation = 0; - ds.tiltx = rotation_table[i][0]; - ds.tilty = rotation_table[i][1]; - wcmTilt2R(&ds, INTUOS4_CURSOR_ROTATION_OFFSET); - g_assert(ds.rotation == rotation_table[i][2]); + int rotation; + int x, y; + x = rotation_table[i][0]; + y = rotation_table[i][1]; + rotation = wcmTilt2R(x, y, INTUOS4_CURSOR_ROTATION_OFFSET); + g_assert(rotation == rotation_table[i][2]); } } |