Conversation
…screen in text.py InputBox Co-authored-by: CAG07 <18625460+CAG07@users.noreply.github.com>
…ls input Co-authored-by: CAG07 <18625460+CAG07@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix audio not working after adding conditionals
Fix audio driver fallback, NameError in InputBox, and add high score entry prompt
Feb 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Three bugs: audio fails after adding SDL driver fallback logic,
NameError: name 'screen' is not definedcrashes the game at game over when pressing Escape in the InputBox, and high score entry is never prompted regardless of score.Audio driver env var restoration (
src/ui/audio.py,missile-defense.py)SDL_AUDIODRIVERwas restored to the original (possibly broken) value even after a working fallback driver was found — now only restores on failuremissile-defense.pyupgraded from baretry/exceptto the same multi-driver fallback loop (None→pulseaudio→alsa→dsp→dummy)NameError in
text.pyexit_game(screen)referenced an undefinedscreenvariable in module scope → replaced withpygame.display.get_surface()pygame.display.update()fromInputBox.draw()— caller now controls display updates, eliminating the stale white rectangle outlineHigh score entry flow (
missile-defense.py,main.py)InputBoxnow only appears whencheck_high_score()confirms the player qualifiesupdate_high_scores()+save_high_scores()instead of hardcoded"---"main.pygains_prompt_initials()— a minimal input loop accepting up to 3 alphanumeric characters✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.