i made a small modification in the input code to allow
playing with direct mouse input from the kernel (using the evdev driver)
the mouse work is done in a separated thread, filling the event queue.
the feeling is good, the response too and it's very smooth.
in_mouse 2 to activate
in_mousedevice to open the wanted device (make sure you have the permissions on it)
but sometimes the game crashs with a "Z_Free: freed a freed pointer"
Z_Free is the one called by Com_EventLoop in Com_Frame
and using gdb i got that it occurs with SE_PACKET event type.
I tried with the default free/malloc from glibc and it crashes too.
I changed the size of the queue event and it doesn't change the behaviour.
Maybe someone with more experience in threads could help if it is thread related.
The evdev code sends more events, so maybe it can come from here too.
Note : i forgot to put #defines to make it linux only but i don't think i'll be applied to HEAD like this ^^
If someone is interested and wants to give some hints or feedbacks that would be great.
Created attachment 2374[details]
threaded version with mutex
The error seems to be some race condition.
I made a version using mutex to acces event ressources on creation.
This one should work fine the time the event queue isn't overflowed.
I would appreciate some feedbacks or/and improvements.
Created attachment 2372 [details] evdev patch
Created attachment 2373 [details] non threaded version I made a non threaded version which works fine
Created attachment 2374 [details] threaded version with mutex The error seems to be some race condition. I made a version using mutex to acces event ressources on creation. This one should work fine the time the event queue isn't overflowed. I would appreciate some feedbacks or/and improvements.