In event_process() if a window closes while being drawn and there isn't a previous window we can get the next from just finish processing for this frame

This commit is contained in:
zicodxx 2011-05-26 09:41:26 +02:00
parent af7c22faa2
commit b9995f3e34
2 changed files with 9 additions and 1 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20110526
--------
arch/sdl/event.c: In event_process() if a window closes while being drawn and there isn't a previous window we can get the next from just finish processing for this frame
20110525
--------
main/game.c, main/multi.c, main/multi.h, main/net_udp.c, main/net_udp.h: Added multi_send_data_direct to send multibuf to a specific player (i.e. Host<->Client, not Client<->Client); Overhauled kill sending/receiving and computation to rely in host information about game_mode-related variables (team_vector, Bounty_target) which are vital for consistent kill computation; Added function to send/update game_mode-related variables and solve /move command with this as well instead of workaround via updating lite_info; Introduced /move commend from Descent2 to move players between teams

View file

@ -159,7 +159,11 @@ void event_process(void)
if (window_is_visible(wind))
window_send_event(wind, &event);
if (!window_exists(wind))
wind = window_get_next(prev); // the current window seemed to be closed. so take the next one from the previous which should be able to point to the one after the currently closed
{
if (!prev) // well there isn't a previous window ...
break; // ... just bail out - we've done everything for this frame we can.
wind = window_get_next(prev); // the current window seemed to be closed. so take the next one from the previous which should be able to point to the one after the current closed
}
else
wind = window_get_next(wind);
}