Does someone know why the timer works only once ?
Tested on RedHat Linux 6.2 with SDL-1.1.6
Regards
Nicolas
#include <stdio.h>
#include <SDL.h>
Uint32 MyTimer(Uint32 nextTime)
{
printf(“timer works !!!\n”);
return 0;
}
int main( int argv, char *argc[])
{
while (1){
SDL_Init(SDL_INIT_TIMER);
SDL_SetTimer(100,MyTimer);
SDL_Delay(500);
printf("Did you see the timer ?\n");
SDL_Quit();
}
return 0;
}