Skip to content
Permalink
Browse files

Add debug logging when overwriting a feature

  • Loading branch information...
garbear committed Oct 11, 2016
1 parent f3afc3d commit 6e891ac7d047040bf350a4971c780d1361398542
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/storage/ButtonMap.cpp
@@ -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());
}

0 comments on commit 6e891ac

Please sign in to comment.
You can’t perform that action at this time.