2
0
Эх сурвалжийг харах

SDLTimer does not use hertz!

woollybah 11 жил өмнө
parent
commit
60d1fbb880
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  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 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) {
 		return 0;