Re: [AD] Windows XP

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> compiling with mingw 2.95 (gcc -mwindows) in the windowed modes programs
> every now and then tend to hang and suck up all the CPU resources.

I get this with BeebEm (which isn't an Allegro prog but uses DirectX 
directly) in Windows 98. Could be a similar bug...

> Gona have a look at the windowing drivers and play around and see if i can
> get it a bit more stable. Also, why does allegro 'grab' the whole CPU? even
> with yeild_timeslice();

Because yield_timeslice() doesn't send the processor to sleep. All it does is 
offer some processor time to other running processes. If there are no such 
processes, the processor comes right back to the Allegro program. DOS within 
Windows appears to be the only platform where the processor will actually go 
to sleep when you call yield_timeslice()...

I think we need a new function that will actually put the processor to sleep. 
In the meantime, you can steal some code from DUMB's example player, 
specifically the definition of YIELD():
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dumb/dumb/examples/dumbplay.c?rev=1.2&content-type=text/vnd.viewcvs-markup

Ben




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/