File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1- // Copyright 2015-2023 the openage authors. See copying.md for legal info.
1+ // Copyright 2015-2024 the openage authors. See copying.md for legal info.
22
33#include " input_manager.h"
44
5+ #include < ranges>
6+
57#include " input/controller/camera/controller.h"
68#include " input/controller/game/controller.h"
79#include " input/controller/hud/controller.h"
810#include " input/event.h"
911#include " input/input_context.h"
1012#include " renderer/gui/guisys/public/gui_input.h"
1113
14+
1215namespace openage ::input {
1316
1417InputManager::InputManager () :
@@ -131,7 +134,7 @@ bool InputManager::process(const QEvent &ev) {
131134 input::Event input_ev{ev};
132135
133136 // Check context list on top of the stack (most recent bound first)
134- for (auto const &ctx : this ->active_contexts ) {
137+ for (auto const &ctx : this ->active_contexts | std::views::reverse ) {
135138 if (ctx->is_bound (input_ev)) {
136139 auto &actions = ctx->lookup (input_ev);
137140 for (auto const &action : actions) {
You can’t perform that action at this time.
0 commit comments