summaryrefslogtreecommitdiff
path: root/src/test/test.c
blob: 4f157b19e60416c3446420e761b497978fb03db5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include "SDL/SDL.h"


Uint32 timeSyncInsertNullEventsIfNeeded(Uint32 interval, void *args) {
	static i=0;
	printf("%i\n",i++);
	return 2000;
}

int main(void) {

	SDL_TimerID timerTimeSync;
	

	SDL_Init(SDL_INIT_TIMER);
	printf("before addtimer\n");
	timerTimeSync = SDL_AddTimer(2000, timeSyncInsertNullEventsIfNeeded, NULL);
	printf("after addtimer\n");

	if ( timerTimeSync==NULL ) {
		printf("bug addtimer\n");
	}

	SDL_Delay(100000);
}