Browse Source

SDLTimer does not use hertz!

woollybah 11 years ago
parent
commit
60d1fbb880
1 changed files with 1 additions and 1 deletions
  1. 1 1
      sdltimer.mod/glue.c

+ 1 - 1
sdltimer.mod/glue.c

@@ -52,7 +52,7 @@ void bmx_sdl_timer_fire( int id, BBObject * obj, int ticks ) {
 }
 }
 
 
 SDL_TimerID bmx_sdl_timer_start( float hertz, BBObject * timer ) {
 SDL_TimerID bmx_sdl_timer_start( float hertz, BBObject * timer ) {
-	SDL_TimerID t = SDL_AddTimer((int)hertz, bmx_sdl_timer_ontick, timer);
+	SDL_TimerID t = SDL_AddTimer(1000/((hertz != 0)?hertz:1), bmx_sdl_timer_ontick, timer);
 	
 	
 	if (!t) {
 	if (!t) {
 		return 0;
 		return 0;