openfl/openfl-native — pull request #154 by Hasufel (2014-01-10 00:45:51+00:00)
Title: SDL_JOYDEVICEADDED and JOYDEVICEREMOVED Lime link

SDL_JOYDEVICEADDED, SDL_JOYDEVICEREMOVED for desktop builds Lime link
(tested working on mac os x).

Implementation :
Lib.current.stage.addEventListener(JoystickEvent.DEVICE_ADDED,
onJoyConnected);
Lib.current.stage.addEventListener(JoystickEvent.DEVICE_REMOVED,
onJoyDisconnected);

private function onJoyConnected(e:JoystickEvent):Void {
//we can grab e.device;
}
private function onJoyDisconnected(e:JoystickEvent):Void {
//we can grab e.device;
}