./configure --enable-release --target=arm-linux-gcc --host=arm-linux --disable-esd --disable-video-opengl
make
make install
copy your lib(something like libSDL-1.2.so.0.11.2) to arm's lib.
timer is one of sample program in SDL src which is /SDL/test
/* Test program to check the resolution of the SDL timer on the current
platform
*/
#include
#include
#include "SDL.h"
#define DEFAULT_RESOLUTION 1
static int ticks = 0;
static Uint32 SDLCALL ticktock(Uint32 interval)
{
++ticks;
return(interval);
}
static Uint32 SDLCALL callback(Uint32 interval, void *param)
{
printf("Timer %d : param = %d\n", interval, (int)(uintptr_t)param);
return interval;
}
int main(int argc, char *argv[])
{
int desired;
SDL_TimerID t1, t2, t3;
if ( SDL_Init(SDL_INIT_TIMER) < desired =" 0;" desired =" atoi(argv[1]);" desired ="="" desired =" DEFAULT_RESOLUTION;" desired =" %d" actual =" %f" t1 =" SDL_AddTimer(100," t2 =" SDL_AddTimer(50," t3 =" SDL_AddTimer(233," desired =" 1" actual =" 10.493179" param =" 2" param =" 2" param =" 1">