Index: xoids-1.5/oids_x.c
===================================================================
--- xoids-1.5.orig/oids_x.c	2008-11-04 16:08:45.000000000 -0500
+++ xoids-1.5/oids_x.c	2008-11-04 16:15:58.000000000 -0500
@@ -12,11 +12,13 @@
 #include <stdio.h>
 #include <math.h>
 #include <string.h>
+#include <stdlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/keysym.h>
 #include <X11/keysymdef.h>
 #include <xpm.h>
+#include <sys/time.h>
 
 #include "oids.h"
 
@@ -460,9 +462,9 @@
 ** X_INIT_PIXMAPS
 **
 */
-void X_init_pixmaps()
+int X_init_pixmaps()
 {
-
+	struct timeval tv, tv2;
 	int i, j, k, len1, len2, wid1, wid2;
 	char *str1 = "ROTATING PIXMAPS";
 	char *str2 = "Be patient, or else you won't get to play";
@@ -485,6 +487,8 @@
 
 	X_color(BLACK);
 
+	gettimeofday(&tv, NULL);
+
 	Xpm_make_pixmaps(P);
 	Xpm_make_pixmaps(P->next);
 	Xpm_make_pixmaps(Slrb);
@@ -527,6 +531,9 @@
 	X_clear();
 	XSetClipRectangles(display, theGC, 0, 0, &clip_rect, 1, Unsorted);
 
+	gettimeofday(&tv2, NULL);
+	return ((tv2.tv_sec - tv.tv_sec) * 1000000) + (tv2.tv_usec - tv.tv_usec);
+
 } /* end X_INIT_PIXMAPS */
 
 
@@ -586,14 +593,9 @@
 
 	event = (XEvent *) calloc(1, sizeof(XEvent));
 
-	if (dl) dl--;
-
-	if (r == ENTER) r = 0;
-
 	XCheckWindowEvent(display, winder, (KeyPressMask | KeyReleaseMask), event);
 	if (event->type == KeyPress) {
 		XLookupString((XKeyEvent *) event, &cc[0], 1, &key, NULL);
-		dl = 0;
 		switch (key) {
 
 		case XK_Up:
@@ -621,16 +623,19 @@
 		}
 
 	} else if (event->type == KeyRelease) {
+		int temp = r;
 		r = 0;
-		dl = 0;
-	}
-
-	if (dl) {
-		return(0);
-	} else {
-		dl = 20;
-		return(r);
+		return temp;
+	} else if (r == LEFTARROW || r == RIGHTARROW) {
+		if (dl == 50) {
+			dl = 0;
+			return r;
+		} else {
+			dl++;
+			return 0;
+		}
 	}
+	return 0;
 
 } /* end X_GET_MENU_KEYS */
 
@@ -710,11 +715,11 @@
 				break;
 			case XK_underscore:
 			case XK_minus:
-				if (delay < 2000) delay += 10;
+				if (delay < 2000) delay += 50;
 				break;
 			case XK_plus:
 			case XK_equal:
-				if (delay > 0) delay -= 10;
+				if (delay > 0) delay -= 50;
 				break;
 			default:
 				break;
@@ -1509,7 +1514,8 @@
 
 			/* Change the size of the back buffer */
 
-			XFreePixmap(display, bbuf);
+			if (bbuf)
+				XFreePixmap(display, bbuf);
 
 			bbuf = XCreatePixmap(display,
 				(Drawable)winder,
