Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16522/src

Modified Files:
	local.c 
Log Message:
Change to border refresh rate.  Doesn't needlessly redraw unless using the new ship bitmaps,
and even with those, it redraws at most 10 times/sec, as this is a CPU intensive function.  Added
bonus that ships can now be seen in the border region, increasing tactical viewable range.

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- local.c	27 Feb 2007 08:37:07 -0000	1.61
+++ local.c	27 Feb 2007 10:16:33 -0000	1.62
@@ -2580,11 +2580,21 @@
             break;
         }
     }
-    /* Force a border redraw */
-    else
+    /* Force a border redraw? Only needed for bitmaps rotated realtime, due 
+       to the overwriting border issue.  Also, very CPU expensive to write
+       rectangles (drawborder function) to the active window, especially if double
+       buffering is off, so let's slow down redraws to at most 10 per second */
+    else if (colorClient == 4)
     {
-    	W_ChangeBorder (w, alertBorderColor);
-    	W_ChangeBorder (mapw, alertBorderColor);
+    	static int border_refresh = 0;
+
+    	border_refresh++;
+        if ((border_refresh * 10 / server_ups) >= 1)
+        {
+    	    W_ChangeBorder (w, alertBorderColor);
+    	    W_ChangeBorder (mapw, alertBorderColor);
+    	    border_refresh = 0;
+        }
     }
 
 #if defined(SOUND)