Helion-Engine / Helion

A modern fast paced Doom FPS engine
GNU General Public License v3.0
98 stars 9 forks source link

User can take a screenshot while remapping screenshot key #597

Closed lemming104 closed 1 week ago

lemming104 commented 1 month ago

Apologies in advance for what is very obviously a pedantic, nitpick bug, but I couldn't not file this one. 🤣

Repro steps:

  1. Launch Helion using any IWAD
  2. Open main menu, go to Options
  3. In the key binding section of the options menu, find the "screenshot" item.
  4. Select it and press Enter to edit the key binding
  5. Press the same key as whatever is currently mapped Expected: The menu should accept your key binding and exit "edit mode", even though there is no "real" change. (This is how every other function on the key binding menu behaves, so I assume this is the desired behavior.) Actual: It stays stuck in edit mode and takes a screenshot instead of binding the key.

Likely introduced by ff4db904663d731f03093b4c9a9820cdd395643f

nstlaurent commented 1 month ago

lol yeah that's a good one. Simple enough fix and done this morning.

lemming104 commented 1 month ago

It now leaves edit mode but still takes a screenshot. Is this the intended behavior? I could construct an argument either way, so I figured it best to confirm before closing this.

I am currently synced to a102ced96bd3c383720e1054db4db3afb15968a5, in case you have other related changes you haven't pushed yet.

nstlaurent commented 1 month ago

Oh I didn't notice it was still executing the screenshot. It probably shouldn't. The function that accepts the binding must not eat the key. I will have to investigate more next time.

lemming104 commented 1 month ago

In a somewhat related point, if you have keys that are dedicated to automap manipulation, you'll get error messages if you press them when the automap isn't raised.

I have the arrow keys bound to directional movement, and WASD bound to the automap scroll functions. If I press W in-game without the automap open, I get this:

helion_20240818_11 55 08 8425