<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi All,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">    I just added a variable to the Windows VM that tracks device additions and removals via receiving WM_DEVICECHANGE messages.  On Windows this allows plugins such as the SoundPlugin and CameraPlugin enumerating the available devices on every API call/primitive invocation rather than only when devices change.  This facility is also needed on Mac and would be great to have on unix.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It turn out that on Mac it is also straight=forward to achieve.  See <a href="https://stackoverflow.com/questions/9918429/how-to-know-when-a-hid-usb-bluetooth-device-is-connected-in-cocoa">https://stackoverflow.com/questions/9918429/how-to-know-when-a-hid-usb-bluetooth-device-is-connected-in-cocoa</a>, especially Vivek Gani's answer (2 upvotes).  It also turns out that much of the necessary support code already exists in the Mac JoystickPlugin.  See platforms/iOS//plugins/JoystickTabletPlugin/HID*.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I wonder if any one has free time to do the work for the Mac to use IOHIDManagerRegisterDeviceMatchingCallback & IOHIDManagerRegisterDeviceRemovalCallback to provide a simple counter in the core Mac VM which is incremented whenever a device changes, just like the Windows implementation.  If not, no biggie I'll get to this eventually.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">And if any unix and/or linux experts know how various unices and especially linux approach this issue please respond here.  I've no idea if unix/linux provide a good API here.</div><div class="gmail_default" style="font-size:small"><br></div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div></div></div>