src/core/linux/SDL_evdev.c
changeset 10446 d5cb09daa54b
parent 10445 d18516d69e7f
child 10566 0fb14a4fca0b
     1.1 --- a/src/core/linux/SDL_evdev.c	Sat Oct 01 14:56:53 2016 -0700
     1.2 +++ b/src/core/linux/SDL_evdev.c	Sat Oct 01 15:04:13 2016 -0700
     1.3 @@ -675,6 +675,7 @@
     1.4  static void
     1.5  SDL_EVDEV_sync_device(SDL_evdevlist_item *item) 
     1.6  {
     1.7 +#ifdef EVIOCGMTSLOTS
     1.8      int i, ret;
     1.9      struct input_absinfo abs_info;
    1.10      /*
    1.11 @@ -698,7 +699,6 @@
    1.12      
    1.13      mt_req_code = SDL_calloc(1, mt_req_size);
    1.14      if (mt_req_code == NULL) {
    1.15 -        SDL_Log("Failed to sync device");
    1.16          return;
    1.17      }
    1.18      
    1.19 @@ -708,7 +708,6 @@
    1.20      ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);
    1.21      if (ret < 0) {
    1.22          SDL_free(mt_req_code);
    1.23 -        SDL_Log("Failed to sync device");
    1.24          return;
    1.25      }
    1.26      for(i = 0; i < item->touchscreen_data->max_slots; i++) {
    1.27 @@ -736,7 +735,6 @@
    1.28      ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);
    1.29      if (ret < 0) {
    1.30          SDL_free(mt_req_code);
    1.31 -        SDL_Log("Failed to sync device");
    1.32          return;
    1.33      }
    1.34      for(i = 0; i < item->touchscreen_data->max_slots; i++) {
    1.35 @@ -755,7 +753,6 @@
    1.36      ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);
    1.37      if (ret < 0) {
    1.38          SDL_free(mt_req_code);
    1.39 -        SDL_Log("Failed to sync device");
    1.40          return;
    1.41      }
    1.42      for(i = 0; i < item->touchscreen_data->max_slots; i++) {
    1.43 @@ -773,12 +770,13 @@
    1.44      ret = ioctl(item->fd, EVIOCGABS(ABS_MT_SLOT), &abs_info);
    1.45      if (ret < 0) {
    1.46          SDL_free(mt_req_code);
    1.47 -        SDL_Log("Failed to sync device");
    1.48          return;
    1.49      }
    1.50      item->touchscreen_data->current_slot = abs_info.value;
    1.51      
    1.52      SDL_free(mt_req_code);
    1.53 +
    1.54 +#endif /* EVIOCGMTSLOTS */
    1.55  }
    1.56  
    1.57  #if SDL_USE_LIBUDEV