mirror of
https://github.com/glfw/glfw.git
synced 2026-09-17 22:32:50 +00:00
Optimize _glfwInitJoysticks on OS X.
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.
This commit is contained in:
committed by
Camilla Berglund
parent
3b7d34a1d5
commit
b4d4fc8f79
@@ -81,6 +81,7 @@ GLFW bundles a number of dependencies in the `deps/` directory.
|
||||
found for a given `CGDisplay`
|
||||
- [Cocoa] Bugfix: Modifier key events were lost if the corresponding modifier
|
||||
bit field was unchanged
|
||||
- [Cocoa] Bugfix: Joystick enumeration took hundreds of ms on some systems
|
||||
- [Win32] Enabled generation of pkg-config file for MinGW
|
||||
- [Win32] Bugfix: Failure to load winmm or its functions was not reported to
|
||||
the error callback
|
||||
@@ -160,6 +161,7 @@ skills.
|
||||
- heromyth
|
||||
- Paul Holden
|
||||
- Toni Jovanoski
|
||||
- Arseny Kapoulkine
|
||||
- Osman Keskin
|
||||
- Cameron King
|
||||
- Peter Knut
|
||||
|
||||
Reference in New Issue
Block a user