Patch for API change.
Index: Xcode-iPhoneOS/Demos/src/touch.c===================================================================
— Xcode-iPhoneOS/Demos/src/touch.c (revision 5478)
+++ Xcode-iPhoneOS/Demos/src/touch.c (working copy)
@@ -79,6 +79,7 @@
SDL_Event event;
SDL_WindowID windowID; /* main window /
int done; / does user want to quit? */
-
int mouse;
/* initialize SDL */
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
@@ -106,9 +107,9 @@
done = 1;
break;
case SDL_MOUSEMOTION:
-
SDL_SelectMouse(event.motion.which); /* select 'mouse' (touch) that moved */
-
mouse = SDL_SelectMouse(event.motion.which); /* select 'mouse' (touch) that moved */ state = SDL_GetMouseState(&x, &y); /* get its location */
-
SDL_GetRelativeMouseState(&dx, &dy); /* find how much the mouse moved */
-
SDL_GetRelativeMouseState(mouse, &dx, &dy); /* find how much the mouse moved */ if (state & SDL_BUTTON_LMASK) { /* is the mouse (touch) down? */ drawLine(x - dx, y - dy, dx, dy); /* draw line segment */ SDL_RenderPresent();
–
df