From 9e08391bde080498672538701ff1915ca7bedc0e Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Mon, 3 Jan 2005 23:30:39 +0000 Subject: [PATCH] Read events during startup, to let SDL update window contents on expose events. Keep progress bar going while loading fonts. --- src/tuxpaint.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 116abc7e5..f90be1a61 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -3,7 +3,7 @@ Tux Paint - A simple drawing program for children. - Copyright (c) 2004 by Bill Kendrick and others; see AUTHORS.txt + Copyright (c) 2005 by Bill Kendrick and others; see AUTHORS.txt bill@newbreedsoftware.com http://www.newbreedsoftware.com/tuxpaint/ @@ -22,12 +22,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - June 14, 2002 - December 31, 2004 + June 14, 2002 - January 3, 2005 */ #define VER_VERSION "0.9.15" -#define VER_DATE "2004-12-31" +#define VER_DATE "2005-01-03" //#define VIDEO_BPP 15 // saves memory @@ -13749,6 +13749,7 @@ static void show_progress_bar(void) { SDL_Rect dest, src; int x; + SDL_Event event; for (x = 0; x < WINDOW_WIDTH; x = x + 65) @@ -13767,6 +13768,11 @@ static void show_progress_bar(void) prog_bar_ctr++; SDL_UpdateRect(screen, 0, WINDOW_HEIGHT - 24, WINDOW_WIDTH, 24); + + + /* Eat any events: */ + + while (SDL_PollEvent(&event)); } @@ -13977,6 +13983,8 @@ static void loadfonts(const char * const dir, int fatal) /* Open the directory: */ + show_progress_bar(); + d = opendir(dir); if (d == NULL) {