On Tue Feb 7 10:05:15 2023 +0000, Rémi Bernon wrote:
I'm not completely sure we should do this here, but at the same time I don't think we can do it on the server side right now as it doesn't keep a list of devices. In any case you should invert the loops, refreshing the device list once, and looking up the client device array for each of the device list iteration: looking up the array is fast as it's sequential (and probably small), whereas iterating the list is slow. I think you could use `MAKELONG` to combine usage and usage page together and make the comparison easier. Regarding the device types I don't think there's anything more to do, we don't really support mouse-like or keyboard-like HID devices at the moment.
I'll need to think a bit about whether this is right. I also don't know if posting the message is alright, or if this should use `Send(Notify)Message` or `__wine_send_input` instead somehow.