Add SmartShift Device feature

This commit is contained in:
pixl
2020-07-02 15:27:30 -04:00
parent 5abf777e00
commit 4e33ad7593
7 changed files with 131 additions and 8 deletions
+11
View File
@@ -21,6 +21,7 @@
#include "backend/hidpp/defs.h"
#include "backend/hidpp20/Device.h"
#include "backend/hidpp20/Feature.h"
#include "features/DeviceFeature.h"
#include "Configuration.h"
@@ -62,6 +63,16 @@ namespace logid
private:
void _init();
/* Adds a feature without calling an error if unsupported */
template<typename T>
void _addFeature()
{
try {
_features.push_back(std::make_shared<T>(this));
} catch (backend::hidpp20::UnsupportedFeature& e) {
}
}
backend::hidpp20::Device _hidpp20;
std::string _path;
backend::hidpp::DeviceIndex _index;