Skip to content

Commit

Permalink
game, allow any key to be pressed to start the game.
Browse files Browse the repository at this point in the history
Fixes: #47
  • Loading branch information
petitlapin committed Apr 17, 2024
1 parent 4d0bef7 commit 2467afe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NEWS.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
Version: 3.1.5
Date: 2024-xx-xx
Description:
- Allow to press any key to start the level as written in the text
---
Version: 3.1.4
Date: 2024-01-15
Description:
Expand Down
7 changes: 7 additions & 0 deletions src/game.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ eMenu Game::SDLMain()
Key = event.key.keysym.sym;

if (event.key.repeat == 0) {
// The text says: "press any key to start"
// so we allow any key press (except Escape)
// to start the game
if (Pause) {
Pause = false;
break;
}
switch (Key) {
case SDLK_UP:
BufTouche(D_Top);
Expand Down

0 comments on commit 2467afe

Please sign in to comment.