1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Added clearing of global joystick data.

This commit is contained in:
Camilla Berglund 2012-08-14 22:00:11 +02:00
parent ac653761b9
commit 0c92fb8500

View File

@ -340,6 +340,8 @@ void _glfwInitJoysticks(void)
CFMutableDictionaryRef hidMatchDictionary = NULL; CFMutableDictionaryRef hidMatchDictionary = NULL;
io_object_t ioHIDDeviceObject = 0; io_object_t ioHIDDeviceObject = 0;
memset(&_glfwJoysticks, 0, sizeof(_glfwJoysticks));
result = IOMasterPort(bootstrap_port, &masterPort); result = IOMasterPort(bootstrap_port, &masterPort);
hidMatchDictionary = IOServiceMatching(kIOHIDDeviceKey); hidMatchDictionary = IOServiceMatching(kIOHIDDeviceKey);
if (kIOReturnSuccess != result || !hidMatchDictionary) if (kIOReturnSuccess != result || !hidMatchDictionary)