This function used to enumerate all devices and capture all properties of every device into a dictionary. This takes 180 ms on a MacBook Pro without external devices and 280 ms with an external keyboard/mouse attached. Since we're only interested in a few properties, we can just get them one by one - this reduces the time to <1 ms. Note that we still use the dictionary to get the joystick elements. For unknown reason this is required to get all axes/buttons - without doing this we don't get any joystick elements in addJoystickElement. Closes #332.master
parent
3b7d34a1d5
commit
b4d4fc8f79
2 changed files with 33 additions and 26 deletions
Loading…
Reference in New Issue