Hello!
Do write your own SDL_Delay Function using SDL_GetTicks ().
This doesn�t idle CPU Time, but it might work.
CU
----- Original Message -----
From: "Jeremy C. Reed" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 31, 2003 6:40 AM
Subject: Re: Re: [Tuxtype-dev] running on NetBSD just hangs
> On Fri, 30 May 2003, Jesse David Andrews wrote:
>
> > you may want to try and see if it is really the
> >
> > SDL_GetTicks command that is messed up. If it is working properly, it
> > should return the number of milliseconds since SDL got initialized...
>
> I am not sure if SDL_GetTicks is wrong, but I do see that SDL_Delay hangs
> it. I placed fprintf's before and after a bunch. And I also commented them
> all out. When all commented out, I was able to play tuxtype2 (without
> sound).
>
> See below ...
>
> > try sprinkling some:
> >
> > printf("current time is %dms\n", SDL_GetTicks());
> >
> > and see if it goes up or if it is always 0 or another constant...
> >
> > Maybe Uint32 isn't being set to a 32 bit unsigned integer, thus problems
> > are happening .... (Uint was mistyped as a CHAR, this would be a HUGE
> > problem, as it would roll over every 255 ms!)
> >
> > maybe try printf("Size of Uint32 = %d\n", sizeof(Uint32));
>
> My code:
>
> if (show_tux4kids) {
> while (SDL_GetTicks()-start < 2000)
> {
> fprintf(stderr, "current time is %dms\n", SDL_GetTicks());
> fprintf(stderr, "Size of Uint32 = %d\n", sizeof(Uint32));
> fprintf(stderr, "going to do SDL_Delay\n");
> SDL_Delay(50);
> }
> show_tux4kids = 0;
> }
>
>
> This returns:
>
> ->Now Animatiting Tux and Title on to the screen
> current time is 633ms
> Size of Uint32 = 4
> going to do SDL_Delay
>
> And it hangs here. Only kill -9 kills it.
>
> Jeremy C. Reed
> http://www.reedmedia.net/
>
> _______________________________________________
> Tuxtype-dev mailing list
> [EMAIL PROTECTED]
> http://tux4kids.net/mailman/listinfo/tuxtype-dev
>
_______________________________________________
Tuxtype-dev mailing list
[EMAIL PROTECTED]
http://tux4kids.net/mailman/listinfo/tuxtype-dev