I’ve created window by
SDL_SetVideoMode (400, 300, 32, SDL_SWSURFACE);
After it I’ve ran game loop:
while (1) { game_processing (); }
When game started I click on the “X” button in the right-top corner of a
window, but window do not close. Why it so?
you have to check for SDL_QUIT events and make your program exit when it
receives one (:> ----- Original Message -----
From: shd@bk.ru (ALakazam))
To:
Sent: Wednesday, January 14, 2004 12:49 PM
Subject: [SDL] Closing windowsI’ve created window by
SDL_SetVideoMode (400, 300, 32, SDL_SWSURFACE);
After it I’ve ran game loop:
while (1) { game_processing (); }
When game started I click on the “X” button in the right-top corner of a
window, but window do not close. Why it so?
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
ALakazam (Skidanov Alexander) wrote:
I’ve created window by
SDL_SetVideoMode (400, 300, 32, SDL_SWSURFACE);
After it I’ve ran game loop:
while (1) { game_processing (); }
When game started I click on the “X” button in the right-top corner of a
window, but window do not close. Why it so?
Hi,
you need to catch SDL_QUIT events. See the event tutorial in the docs.
Sebastian