[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> I think there are some more in my BeOS partition-in-a-file. I'll
> send them when I bother to boot into Be.
Ok, I'll wait for you to send me that todos list. Thanks!
> Time. I've just finished year 12, so I'll get time to do stuff in
> about three weeks (after final exams).
eheh, I fully understand you... But I'm still far from the final exams; I've
done 12 (should be 13 on Saturday =) ) out of 28 exams to become an electronical
engineer.
Ok, now on the BeOS gfx driver. First of all, I've implemented the window
updater based on dirty lines only, and I've followed Jason's suggestion about
threads and semaphores. But I still have problems. The lib compiles without
errors, and the test program for example runs, but sometimes some lines aren't
updated correctly. What I did was:
- In the bank read/write switching routine I just set the dirty flag of a
specified line
- In the unwrite bank routine I call release_sem() on the drawing sem.
- The drawing thread does an acquire_sem() on the drawing sem, then updates
dirty lines on the window and unsets the corresponding dirty line flags.
I suppose this doesn't work nicely because during the update the main program
could still call the bank writing routine, setting dirty flags, all while the
drawing thread is still updating old lines. I've tried to prevent this, but
without success so far. I'm sure this is for my inexperience with threads...
Talking of other news, I've modified the mouse handling; now the mouse cursor
disappears when you move on the program window, and I've also added mouse wheel
support. I had to handle mouse wheel outside the mouse thread, because I wasn't
able to find a way to determine the wheel position other than with the
B_WHEEL_CHANGED BWindow message; so I had to add a handler for this one in the
messages handling of BeAllegroScreen and BeAllegroWindow.
Also, mouse driver now reports correct number of mouse buttons; I don't
understand why Jason made the mouse init routine to return always 2 buttons...
About the MIDI driver: looks like the problem isn't in my code. I'm pretty sure
about this, as the programs give a SIGSEGV not only when using my driver, but
also when using the DIGMID one. As previously reported, this happens only with
some MIDI songs... And it seems the setup program uses one of these as it
crashes when you test the MIDI setup...
--
Angelo Mottola
a.mottola@xxxxxxxxxx