trying to fix the console hang
This commit is contained in:
parent
ed13cf62d1
commit
f917fbdac5
@ -55,7 +55,7 @@ static void parse_arguments(int argc, char **argv, char *filename, char *difficu
|
||||
/* Main game loop */
|
||||
static int main_game_loop(int argc, char *argv[]) {
|
||||
WINDOW *stdscr;
|
||||
static GameState game;
|
||||
static GameState game; /* static to avoid stack overflow on DOS */
|
||||
char filename[MAX_FILENAME];
|
||||
char difficulty[32];
|
||||
char message[MAX_MESSAGE] = "";
|
||||
@ -73,7 +73,14 @@ static int main_game_loop(int argc, char *argv[]) {
|
||||
noecho(); /* Don't echo typed characters */
|
||||
cbreak(); /* Disable line buffering */
|
||||
curs_set(0);
|
||||
#ifdef PLATFORM_DOS
|
||||
/* PDCurses on DOS: disable keypad to avoid escape sequence delays */
|
||||
keypad(stdscr, FALSE);
|
||||
/* Allow Ctrl+Break to work properly */
|
||||
raw();
|
||||
#else
|
||||
keypad(stdscr, TRUE); /* Enable special key detection */
|
||||
#endif
|
||||
clear();
|
||||
|
||||
/* Initialize colors */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user