comparison src/events/SDL_touch.c @ 4868:d6adaafcfb10

Fixed compiling with Visual Studio 2008
author Sam Lantinga <slouken@libsdl.org>
date Sun, 29 Aug 2010 14:22:22 -0700
parents fff50e86c891
children 716b2cbf4c9e
comparison
equal deleted inserted replaced
4867:ba7492f9e2b8 4868:d6adaafcfb10
364 } 364 }
365 if(posted) finger->down = SDL_TRUE; 365 if(posted) finger->down = SDL_TRUE;
366 return posted; 366 return posted;
367 } 367 }
368 else { 368 else {
369 if(finger == NULL) {printf("Finger not found...\n");return 0;} 369 if(finger == NULL) {
370 SDL_SetError("Finger not found.");
371 return 0;
372 }
370 posted = 0; 373 posted = 0;
371 if (SDL_GetEventState(SDL_FINGERUP) == SDL_ENABLE) { 374 if (SDL_GetEventState(SDL_FINGERUP) == SDL_ENABLE) {
372 SDL_Event event; 375 SDL_Event event;
373 event.tfinger.type = SDL_FINGERUP; 376 event.tfinger.type = SDL_FINGERUP;
374 event.tfinger.touchId = id; 377 event.tfinger.touchId = id;
550 } 553 }
551 return touch->name; 554 return touch->name;
552 } 555 }
553 556
554 int SDL_TouchNotFoundError(SDL_TouchID id) { 557 int SDL_TouchNotFoundError(SDL_TouchID id) {
555 int i; 558 //int i;
556 printf("ERROR: Cannot send touch on non-existent device with id: %li make sure SDL_AddTouch has been called\n",id); 559 SDL_SetError("ERROR: Cannot send touch on non-existent device with id: %li make sure SDL_AddTouch has been called\n",id);
560 #if 0
557 printf("ERROR: There are %i touches installed with Id's:\n",SDL_num_touch); 561 printf("ERROR: There are %i touches installed with Id's:\n",SDL_num_touch);
558 for(i=0;i < SDL_num_touch;i++) { 562 for(i=0;i < SDL_num_touch;i++) {
559 printf("ERROR: %li\n",SDL_touchPads[i]->id); 563 printf("ERROR: %li\n",SDL_touchPads[i]->id);
560 } 564 }
565 #endif
561 return 0; 566 return 0;
562 } 567 }
563 /* vi: set ts=4 sw=4 expandtab: */ 568 /* vi: set ts=4 sw=4 expandtab: */