From 004a78bc7744b5464d994f4f292367767a9f0a10 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 31 May 2006 14:33:48 +0000 Subject: [PATCH] * Fixed matrix.c for non-Thinkpad computers. --- test/matrix.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/matrix.c b/test/matrix.c index 6e59dd2..e554dc4 100644 --- a/test/matrix.c +++ b/test/matrix.c @@ -69,14 +69,13 @@ int main(void) { FILE *f = fopen("/sys/devices/platform/hdaps/position", "r"); - if(!f) + if(f) { - have_hdaps = 0; - break; + fscanf(f, "(%d,%d)", &sensorx, &sensory); + fclose(f); } - - fscanf(f, "(%d,%d)", &sensorx, &sensory); - fclose(f); + else + have_hdaps = 0; } w = cucul_get_canvas_width(cv);