Re: [AD] About the Win2k bug

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


On Sat, 17 Mar 2001, Eric Botcazou wrote:

> Therefore I made the single-threaded driver the default. While it solves the
> Win2k problem, I think having a single time critical thread for handling all
> the timers is rather clever and resource saving. This ends up limiting the
> number of threads in an Allegro program to 5:
> - primary thread (with the main() function): normal priority
> - window thread (general purpose messages): normal priority
> - mouse thread: above normal priority
> - keyboard thread: above normal priority
> - timers thread: time critical priority
> I don't finally know if it's worth it to merge the three input threads in a
> single one since, when the user doesn't interact with the program, they are
> idle and use 0% CPU time.

separating things into threads only makes sense if it gives speedups on SMP
boxes or otherwise clears up the the sources by separating code with different
functionality into their respective threads. limiting the number of threads
makes sense to me... so go ahead if you want and merge the keyboard and mouse
threads.

> The patch is attached. It fixes the Win2k bug, changes the DirectInput
> keyboard cooperative level to FOREGROUND, so that the application doesn't
> get the keystrokes any longer when it is in the background, and fixes a
> minor mouse pointer glitch in fullscreen mode.

great. i've put the files in the repository for now. i'm going to test the code
properly later.

-- 
Sincerely Henrik Stokseth.
----------------------------------------------------------------------------
"Linux is keyboard friendly. I don't smash it like I used to with Windows."
Homepage: http://hstokset.n3.net  E-mail: hstokset@xxxxxxxxxx



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