Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
============================================================
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 28, 2011
1 parent 29bb8ec commit e3ad0be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/video/x11/SDL_x11touch.c
Expand Up @@ -51,6 +51,10 @@ X11_InitTouch(_THIS)

sprintf(tstr,"/dev/input/event%i",event);

int tsfd = open( tstr, O_RDONLY | O_NONBLOCK );
if ( tsfd == -1 )
continue; /* Maybe not enough permissions ? */

SDL_Touch touch;
touch.pressure_max = 0;
touch.pressure_min = 0;
Expand All @@ -66,8 +70,7 @@ X11_InitTouch(_THIS)
data->up = SDL_FALSE;
data->down = SDL_FALSE;

data->eventStream = open(tstr,
O_RDONLY | O_NONBLOCK);
data->eventStream = tsfd;
ioctl (data->eventStream, EVIOCGNAME (sizeof (tstr)), tstr);

int abs[5];
Expand Down

0 comments on commit e3ad0be

Please sign in to comment.