From 80a9d4d8ec9705db3a4c1ea933bce6aafc30ed6e Mon Sep 17 00:00:00 2001 From: thorium1256 Date: Mon, 30 Jun 2025 11:06:57 +0300 Subject: [PATCH] fixed unusual terminal state after quitting --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 48b26e9..41bc375 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -177,10 +177,10 @@ void startGame(Board &board) cursorX = (cursorX < boardSize.x - 1) ? cursorX + 1 : 0; break; case 'q': - exit(0); echo(); cbreak(); endwin(); + exit(0); break; case 'z': if (!somethingHasBeenDone) @@ -283,10 +283,10 @@ void startGame(Board &board) Board newBoard(boardSize.x, boardSize.y, board.getMineCount()); startGame(newBoard); } else if(c == 'q') { - exit(0); echo(); cbreak(); endwin(); + exit(0); } }; } @@ -313,10 +313,10 @@ void startGame(Board &board) Board newBoard(boardSize.x, boardSize.y, board.getMineCount()); startGame(newBoard); } else if(c == 'q') { - exit(0); echo(); cbreak(); endwin(); + exit(0); } }; }