comparison src/video/x11/SDL_x11events.c @ 4655:4c94f2023d62

Fixed bugs in input, cleaned up $1
author Jim Grandpre <jim.tla@gmail.com>
date Fri, 18 Jun 2010 01:43:02 -0400
parents eea1bf53effa
children 03dcb795c583
comparison
equal deleted inserted replaced
4654:7dbcd71216df 4655:4c94f2023d62
461 if(ev[i].code == MSC_SERIAL) 461 if(ev[i].code == MSC_SERIAL)
462 data->finger = ev[i].value; 462 data->finger = ev[i].value;
463 break; 463 break;
464 case EV_SYN: 464 case EV_SYN:
465 //printf("Id: %i\n",touch->id); 465 //printf("Id: %i\n",touch->id);
466 if(data->x >= 0 || data->y >= 0) 466 if(data->up) {
467 SDL_SendTouchMotion(touch->id,data->finger, 467 SDL_SendFingerDown(touch->id,data->finger,
468 SDL_FALSE,data->x,data->y, 468 SDL_FALSE,data->x,data->y,
469 data->pressure);
470 }
471 else if(data->x >= 0 || data->y >= 0)
472 SDL_SendTouchMotion(touch->id,data->finger,
473 SDL_FALSE,data->x,data->y,
469 data->pressure); 474 data->pressure);
470 if(data->up) 475
471 SDL_SendFingerDown(touch->id,data->finger,
472 SDL_FALSE,data->x,data->y,
473 data->pressure);
474 //printf("Synched: %i tx: %i, ty: %i\n", 476 //printf("Synched: %i tx: %i, ty: %i\n",
475 // data->finger,data->x,data->y); 477 // data->finger,data->x,data->y);
476 data->x = -1; 478 data->x = -1;
477 data->y = -1; 479 data->y = -1;
478 data->pressure = -1; 480 data->pressure = -1;