Skip to content

games/snake: Fix terminal issue after returning back from snake game #3126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eren-terzioglu
Copy link
Contributor

Summary

When snake game with GAMES_SNAKE_USE_CONSOLEKEY option enabled, nsh crashes after returning from the game. This PR fixes the issue

  • games/snake: Fix terminal issue after returning back from snake game
    Fix terminal issue after returning back from game

Impact

Snake game

Testing

esp32-devkitc:snake config with GAMES_SNAKE_USE_CONSOLEKEY and DEBUG_SNAKE_GAME options enabled. You can recreate issue by pressing left arrow key at the end of the game. Expected issue is 'nsh' will act weird and echo option would not work.

@eren-terzioglu
Copy link
Contributor Author

Thanks @xiaoxiang781216, updated.

@xiaoxiang781216 xiaoxiang781216 requested a review from acassis July 12, 2025 04:51
jerpelea
jerpelea previously approved these changes Jul 15, 2025
@eren-terzioglu
Copy link
Contributor Author

Thanks @acassis @xiaoxiang781216, updated.

Fix terminal issue after returning back from game

Signed-off-by: Eren Terzioglu <[email protected]>
Change consolekey magic numbers with ascii values to make it more understandable

Signed-off-by: Eren Terzioglu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants