diff 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
line wrap: on
line diff
--- a/src/events/SDL_touch.c	Sun Aug 29 12:00:09 2010 -0700
+++ b/src/events/SDL_touch.c	Sun Aug 29 14:22:22 2010 -0700
@@ -366,7 +366,10 @@
 	return posted;
     }
     else {
-        if(finger == NULL) {printf("Finger not found...\n");return 0;}      
+        if(finger == NULL) {
+            SDL_SetError("Finger not found.");
+            return 0;
+        }      
 	posted = 0;
 	if (SDL_GetEventState(SDL_FINGERUP) == SDL_ENABLE) {
 	    SDL_Event event;
@@ -552,12 +555,14 @@
 }
 
 int SDL_TouchNotFoundError(SDL_TouchID id) {
-  int i;
-  printf("ERROR: Cannot send touch on non-existent device with id: %li make sure SDL_AddTouch has been called\n",id);
+  //int i;
+  SDL_SetError("ERROR: Cannot send touch on non-existent device with id: %li make sure SDL_AddTouch has been called\n",id);
+#if 0
   printf("ERROR: There are %i touches installed with Id's:\n",SDL_num_touch);
   for(i=0;i < SDL_num_touch;i++) {
     printf("ERROR: %li\n",SDL_touchPads[i]->id);
   }
+#endif
   return 0;
 }
 /* vi: set ts=4 sw=4 expandtab: */