Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix squeak and save spam in gamepad menu
If you push a button to set a controller binding, you may either hear one Viridian squeak, two Viridian squeaks (a louder one), or Viridian doesn't stop squeaking until you let go of the button. While you hear the continuous squeaking, your save file is also repeatedly saved. There are two small bugs at play here: - the squeak is actually played in two different places at the same time (both in titleinput() whenever a button is pressed, and in updatebuttonmappings() when a mapping is succesfully changed) - titleinput() doesn't register that a button is held down and applies the button (and saves to file) every frame for as long as the button is held This commit fixes both these issues. Now a single button press always causes one squeak, and only if the bindings actually changed. Your save file is also no longer saved repeatedly from holding down the button.
- Loading branch information