ENABLE_3DCONNEXION_DEVICES -> Hack for filtering out mouse wheel events coming from 3Dconnexion driver

This commit is contained in:
Enrico Turri 2019-10-08 08:44:50 +02:00
commit 8aa33a9e05
39 changed files with 1608 additions and 486 deletions

View file

@ -80,6 +80,12 @@ public:
}
}
bool has_section(const std::string &section) const
{ return m_storage.find(section) != m_storage.end(); }
const std::map<std::string, std::string>& get_section(const std::string &section) const
{ return m_storage.find(section)->second; }
void set_section(const std::string &section, const std::map<std::string, std::string>& data)
{ m_storage[section] = data; }
void clear_section(const std::string &section)
{ m_storage[section].clear(); }
@ -131,6 +137,9 @@ public:
bool get_mouse_device_rotation_speed(const std::string& name, float& rotation_speed);
#endif // ENABLE_3DCONNEXION_DEVICES
static const std::string SECTION_FILAMENTS;
static const std::string SECTION_MATERIALS;
private:
// Map of section, name -> value
std::map<std::string, std::map<std::string, std::string>> m_storage;