[SDL] Problem with SDL_Touch after last SDL update
gabriele.greco at darts.it
Tue Mar 12 03:44:52 PDT 2013
> After I updated to the latest SDL HG for android I got a weird error.
> *"error: 'SDL_Touch' was not declared in this scope"*
> It used to work before the last update.
One of the last breaking changes before the API freeze has been to scale
tfinger.x/y from 0 to 1, so you don't need the SDL_GetTouch call, your code:
> Finger_State = SDL_GetTouch(gv.event.tfinger.touchId);
> fx = (GLuint)(((GLfloat)gv.event.tfinger.x /
> Finger_State->xres) * SCREEN_WIDTH);
> fy = (GLuint)(((GLfloat)gv.event.tfinger.y /
> Finger_State->yres) * SCREEN_HEIGHT);
Can be simplified this way:
fx = (GLuint)((GLfloat)gv.event.tfinger.x * SCREEN_WIDTH);
fy = (GLuint)((GLfloat)gv.event.tfinger.y * SCREEN_HEIGHT);
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL