diff options
author | aliaspider | 2015-11-04 18:17:04 +0100 |
---|---|---|
committer | aliaspider | 2015-11-04 18:17:04 +0100 |
commit | d2100979fd519b40c61dbdc6808120755513c88a (patch) | |
tree | 44df448bc43815273f6ceb8a8d33aab6291eb80f /src/touchscreen.c | |
parent | 0e70c7f861ed41b86be891882d08cd0fa0530d55 (diff) | |
download | snes9x2002-d2100979fd519b40c61dbdc6808120755513c88a.tar.gz snes9x2002-d2100979fd519b40c61dbdc6808120755513c88a.tar.bz2 snes9x2002-d2100979fd519b40c61dbdc6808120755513c88a.zip |
cleanups
Diffstat (limited to 'src/touchscreen.c')
-rw-r--r-- | src/touchscreen.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/touchscreen.c b/src/touchscreen.c deleted file mode 100644 index 90e0b81..0000000 --- a/src/touchscreen.c +++ /dev/null @@ -1,47 +0,0 @@ -#include "stdio.h" -#include "stdlib.h" -#include "tslib.h" - -struct tsdev *ts = NULL; - -int InitTouchScreen(void) { - // Taken directly from tslib test sources, slightly modifed - char *tsdevice = NULL; - - if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) { - ts = ts_open(tsdevice, 1); - } else { - ts = ts_open("/dev/input/event0", 1); - } - - if (!ts) { - perror("ts_open"); - return 0; - } - if (ts_config(ts)) { - perror("ts_config"); - return 0; - } - - return 1; -} - -void DeInitTouchScreen(void) { - // Nothing to do -} - - -// return -1 on error, else pressure value - -int getTouchScreen(int *x, int *y) { - struct ts_sample tsdata; - - if (ts == NULL) return -1; - - if (ts_read(ts, &tsdata, 1) != 1) return -1; - - *x = tsdata.x; - *y = tsdata.y; - return tsdata.pressure; -} - |