SFTtech / openage

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

Fix order of processing input contexts #1640

Closed heinezen closed 2 months ago

heinezen commented 2 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.