Simplify ResetInputChannels

This commit is contained in:
nvsickle
2021-04-20 15:12:39 -07:00
parent ba5e0170a2
commit 4f9d7e3782
2 changed files with 4 additions and 12 deletions
@@ -89,19 +89,11 @@ namespace AzFramework
return;
}
for (const auto priority : {
ViewportControllerPriority::Highest,
ViewportControllerPriority::High,
ViewportControllerPriority::Normal,
ViewportControllerPriority::Low,
ViewportControllerPriority::Lowest })
for (const auto& controllerList : m_controllers)
{
if (auto priorityListIt = m_controllers.find(priority); priorityListIt != m_controllers.end())
for (const auto& controller : controllerList.second)
{
for (const auto& controller : priorityListIt->second)
{
controller->ResetInputChannels();
}
controller->ResetInputChannels();
}
}
}
@@ -38,7 +38,7 @@ namespace AzFramework
//! InputChannelEvents are sent to controllers in priority order (from the lowest priority value to the highest).
bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override;
//! Dispatches a ResetInputChannels call to all controllers registered to this list.
//! Calls to controllers are made in priority order (from the lowest priority value to the highest).
//! Calls to controllers are made in an undefined order.
void ResetInputChannels() override;
//! Dispatches an update tick to all controllers registered to this list.
//! This occurs in *reverse* priority order (i.e. from the highest priority value to the lowest) so that