On Wed, Jul 19, 2006 at 02:03:06PM +0100, Robert Shearman wrote:
Hi Robert,
thanks for your comments.
so what i have tried so far:
- put find_joydevs into a critical section
This should work. Why don't you share the patch you used to do this?
because i have dumped it, after there where no success ;)
it was basically like this: put a crititcal section and the _debug stuff (stolen from another dll) in the file and call Enter/Leave on the start/end of the find_joydevs method.
Note that none of the data in JoystickImpl is protected by that critical section and maybe it should be.
in general i dont really like the idea of calling find_joydevs every time it *might* be needed and i would prefer to go a way like registering also hooks in the dinput-implementations to allow the devices to "find themself" on dinput.dll's startup (add a init-method where the enum/create hooks are). this is what i would have tried next (and i guess still will). there i can put a critical secion also.