diff --git a/FlippR-Driver/src/input/InputDriverFactory.cpp b/FlippR-Driver/src/input/InputDriverFactory.cpp index c78a8a3..19295f5 100644 --- a/FlippR-Driver/src/input/InputDriverFactory.cpp +++ b/FlippR-Driver/src/input/InputDriverFactory.cpp @@ -45,9 +45,9 @@ namespace Input { void - InputDriverFactory::create_input_events(json matrix_config, std::map> address_event_map, - std::map> name_event_map) { - for (auto &json_event : matrix_config) { + InputDriverFactory::create_input_events(json matrix_config, std::map>& address_event_map, + std::map>& name_event_map) { + for (auto &json_event : matrix_config.at("input_matrix")) { try { std::string name = json_event.at("name"); diff --git a/FlippR-Driver/src/input/InputDriverFactory.h b/FlippR-Driver/src/input/InputDriverFactory.h index 6b285f4..a309a9e 100644 --- a/FlippR-Driver/src/input/InputDriverFactory.h +++ b/FlippR-Driver/src/input/InputDriverFactory.h @@ -29,7 +29,7 @@ public: static std::shared_ptr get_InputDriver(std::istream& input_config_stream, std::istream& matrix_config_stream); private: - static void create_input_events(nlohmann::json matrix_config, std::map> address_event_map, std::map> name_event_map); + static void create_input_events(nlohmann::json matrix_config, std::map>& address_event_map, std::map>& name_event_map); }; } }