Skip to content

Commit

Permalink
Add debug logging when overwriting a feature
Browse files Browse the repository at this point in the history
  • Loading branch information
garbear committed Oct 11, 2016
1 parent f3afc3d commit 6e891ac
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/storage/ButtonMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ void CButtonMap::MapFeatures(const std::string& controllerId, const FeatureVecto
for (auto& newFeature : features)
{
myFeatures.erase(std::remove_if(myFeatures.begin(), myFeatures.end(),
[newFeature](const ADDON::JoystickFeature& feature)
[newFeature, controllerId](const ADDON::JoystickFeature& feature)
{
return feature.Name() == newFeature.Name();
if (feature.Name() == newFeature.Name())
{
dsyslog("%s: Overwriting feature \"%s\"", controllerId.c_str(), feature.Name().c_str());
return true;
}
return false;
}), myFeatures.end());
}

Expand Down

0 comments on commit 6e891ac

Please sign in to comment.