Ignore:
Timestamp:
Nov 11, 2005, 1:05:33 PM (18 years ago)
Author:
Sam Hocevar
Message:
  • Closing the window quits the game.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/sdlport/event.cpp

    r4 r23  
    150150                                case SDL_QUIT:
    151151                                {
    152                                         if( the_game->state == RUN_STATE )
    153                                         {
    154                                                 // We're in the actual game so just confirm the user
    155                                                 // wishes to quit and exit the game.
    156                                                 if( confirm_quit() )
    157                                                 {
    158                                                         the_game->end_session();
    159                                                 }
    160                                         }
    161                                         else
    162                                         {
    163                                                 // We're at the menu screen so simluate the user
    164                                                 // pressing the ESC key.
    165                                                 ev.type = EV_KEY;
    166                                                 ev.key = JK_ESC;
    167                                         }
     152                                        exit(0);
    168153                                        break;
    169154                                }
Note: See TracChangeset for help on using the changeset viewer.