src/events/SDL_mouse.c
changeset 12929 d6c5eb7a0afb
parent 12886 6f8f744a09dc
child 12934 d03900e991a2
equal deleted inserted replaced
12928:3c4a4b1077cd 12929:d6c5eb7a0afb
   381         xrel = 0;
   381         xrel = 0;
   382         yrel = 0;
   382         yrel = 0;
   383         mouse->has_position = SDL_TRUE;
   383         mouse->has_position = SDL_TRUE;
   384     }
   384     }
   385 
   385 
   386 #ifndef __MACOSX__  /* all your trackpad input would lack relative motion when not dragging in this case. */
       
   387     /* Ignore relative motion positioning the first touch */
   386     /* Ignore relative motion positioning the first touch */
   388     if (mouseID == SDL_TOUCH_MOUSEID && !mouse->buttonstate) {
   387     if (mouseID == SDL_TOUCH_MOUSEID && !mouse->buttonstate) {
   389         xrel = 0;
   388         xrel = 0;
   390         yrel = 0;
   389         yrel = 0;
   391     }
   390     }
   392 #endif
       
   393 
   391 
   394     /* Update internal mouse coordinates */
   392     /* Update internal mouse coordinates */
   395     if (!mouse->relative_mode) {
   393     if (!mouse->relative_mode) {
   396         mouse->x = x;
   394         mouse->x = x;
   397         mouse->y = y;
   395         mouse->y = y;