Fix squeak and save spam in gamepad menu #1219
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
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.
(Don't forget to unmute the video:)
2024-12-21_04-59-22.mp4
There are two small bugs at play here:
titleinput()
whenever a button is pressed, and inupdatebuttonmappings()
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 heldThis PR 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.
Legal Stuff:
By submitting this pull request, I confirm that...
CONTRIBUTORS
file and the "GitHub Friends"section of the credits for all of said releases, but will NOT be compensated
for these changes unless there is a prior written agreement