mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-14 23:56:29 +00:00
eliminated some hid-thread race conditions
This commit is contained in:
@@ -12,14 +12,15 @@ public:
|
||||
{}
|
||||
void deviceConnected(CDeviceToken& tok)
|
||||
{
|
||||
printf("CONNECTED %s %s\n", tok.getVendorName().c_str(), tok.getProductName().c_str());
|
||||
smashAdapter = dynamic_cast<CDolphinSmashAdapter*>(tok.openAndGetDevice());
|
||||
}
|
||||
void deviceDisconnected(CDeviceToken& tok)
|
||||
void deviceDisconnected(CDeviceToken&, CDeviceBase* device)
|
||||
{
|
||||
printf("DISCONNECTED %s %s\n", tok.getVendorName().c_str(), tok.getProductName().c_str());
|
||||
delete smashAdapter;
|
||||
smashAdapter = NULL;
|
||||
if (smashAdapter == device)
|
||||
{
|
||||
delete smashAdapter;
|
||||
smashAdapter = NULL;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user