Index: client/gui-ftwl/gui_main.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-ftwl/gui_main.c,v retrieving revision 1.4 diff -u -r1.4 gui_main.c --- client/gui-ftwl/gui_main.c 9 Oct 2004 11:59:38 -0000 1.4 +++ client/gui-ftwl/gui_main.c 9 Oct 2004 13:16:09 -0000 @@ -39,6 +39,11 @@ #include "gui_main.h" +/* See timer_callback() below for documentation on these */ +#define FTWL_FPS 20 +#define FTWL_MSPF 1000 / FTWL_FPS +#define FPS_INTERVAL_COUNTER (TIMER_INTERVAL / FTWL_MSPF) + client_option gui_options[] = { }; const int num_gui_options = ARRAY_SIZE(gui_options); @@ -61,13 +66,24 @@ } /************************************************************************** - ... + This sets up the FPS (frames per second) of our map redraw, and also + calls real_timer_callback() from the client common code, which sets up + the game countdown and unit blinking. real_timer_callback() must be + called every TIMER_INTERVAL ms. + + FTWL_FPS = Frames per second + FTWL_MSPF = Milliseconds between each frame + FPS_INTERVAL_COUNTER = Frames until we need to call real_timer_callback **************************************************************************/ static void timer_callback(void *data) { - real_timer_callback(); - //sw_add_timeout(TIMER_INTERVAL, timer_callback, NULL); - sw_add_timeout(1000, timer_callback, NULL); + static int counter = FPS_INTERVAL_COUNTER; + + if (counter == 0) { + real_timer_callback(); + counter = FPS_INTERVAL_COUNTER; + } + sw_add_timeout(FTWL_MSPF, timer_callback, NULL); } /************************************************************************** Index: utility/ftwl/be_x11_ximage.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/utility/ftwl/be_x11_ximage.c,v retrieving revision 1.2 diff -u -r1.2 be_x11_ximage.c --- utility/ftwl/be_x11_ximage.c 7 Oct 2004 15:24:45 -0000 1.2 +++ utility/ftwl/be_x11_ximage.c 9 Oct 2004 13:16:10 -0000 @@ -33,10 +33,6 @@ #include "mem.h" -// fixme -#include "timing.h" -#include "widget.h" - static Display *display; static Window window; static int screen_number; @@ -236,8 +232,6 @@ } } - sw_paint_all(); - { fd_set readfds, exceptfds; int ret, highest = x11fd;