Exemple #1
0
std::string InputDeviceAdapterPlayback::getFeatureName(const InputDeviceFeature& feature) const
	{
	/* Find the input device owning the given feature: */
	int featureBaseIndex=-1;
	for(int deviceIndex=0;deviceIndex<numInputDevices;++deviceIndex)
		{
		if(inputDevices[deviceIndex]==feature.getDevice())
			{
			featureBaseIndex=deviceFeatureBaseIndices[deviceIndex];
			break;
			}
		}
	if(featureBaseIndex<0)
		Misc::throwStdErr("InputDeviceAdapterPlayback::getFeatureName: Unknown device %s",feature.getDevice()->getDeviceName());
	
	/* Return the feature name: */
	return deviceFeatureNames[featureBaseIndex+feature.getFeatureIndex()];
	}