SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.78k stars 1.12k forks source link

Fix order of processing input contexts #1640

Closed heinezen closed 6 months ago

heinezen commented 7 months ago

Fixes the order in which input contexts are searched. The intended order was LIFO (like a stack) but the implemented order was FIFO (like a list).

This was a nice opportunity to use std::views::reverse from the ranges library in C++20 :D Disregard that because clang is too old :(

I also added a separate callback list for mouse move actions to the window because mixing them with mouse button actions can be annoying during debugging. This lead me to discover an error in the input demo where some keybindings were not properly assigned which is now also fixed.