8auto get_axis_value(
const float value,
19 v = value > 0.0f ? value : 0.0f;
22 v = value < 0.0f ? value : 0.0f;
25 throw std::runtime_error(
"Case not implemented.");
34 const auto&
find = entries_by_action_id_.find(action);
36 if(
find == entries_by_action_id_.end())
41 const auto& entries =
find->second;
43 for(
const auto&
entry : entries)
49 const float value = get_axis_value(device.get_axis_value(
entry.value),
61 if(device.is_down(
entry.value))
81 const auto&
find = entries_by_action_id_.find(action);
83 if(
find == entries_by_action_id_.end())
88 const auto& entries =
find->second;
90 for(
const auto&
entry : entries)
96 const float value = get_axis_value(device.get_axis_value(
entry.value),
108 if(device.is_down(
entry.value))
126 const auto&
find = entries_by_action_id_.find(action);
128 if(
find == entries_by_action_id_.end())
133 const auto& entries =
find->second;
135 for(
const auto&
entry : entries)
146 if(device.is_pressed(
entry.value))
163 const auto&
find = entries_by_action_id_.find(action);
165 if(
find == entries_by_action_id_.end())
170 const auto& entries =
find->second;
172 for(
const auto&
entry : entries)
183 if(device.is_released(
entry.value))
200 const auto&
find = entries_by_action_id_.find(action);
202 if(
find == entries_by_action_id_.end())
207 const auto& entries =
find->second;
209 for(
const auto&
entry : entries)
220 if(device.is_down(
entry.value))
252 entry.value =
static_cast<uint32_t
>(
axis);