--- atanks-4.3.old/src/atanks.cpp +++ atanks-4.3/src/atanks.cpp @@ -518,6 +518,12 @@ return (0); } +void handle_close (void) +{ + allegro_exit(); + exit (1); +} + ENVIRONMENT *init_game_settings (GLOBALDATA *global) { int count, x, y, z; @@ -576,6 +582,8 @@ set_display_switch_mode(SWITCH_BACKGROUND); #endif + set_close_button_callback (handle_close); + if (install_keyboard () < 0) { perror ( "install_keyboard failed");