Exit programm properly when exit with KEY_DELETE
This commit is contained in:
parent
96499a06cb
commit
033a436be2
1 changed files with 5 additions and 0 deletions
|
@ -128,10 +128,15 @@ void set_next_player_move(s_move * m, p_view v)
|
|||
case KEY_BACKSPACE:
|
||||
case 127:
|
||||
case '\b':
|
||||
// if we are in inner TTT window, go back to outer
|
||||
if ( outer_selected == true && v->p_uttt->inception_level == 2 ) {
|
||||
outer_selected = false;
|
||||
}
|
||||
else {
|
||||
// If not Exit programm, but we need to do it properly.
|
||||
free_utictactoe(v->p_uttt);
|
||||
free_move(m);
|
||||
free_view(v);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue