From: notaz <notasas@gmail.com>
Date: Mon, 26 May 2008 21:30:07 +0000 (+0000)
Subject: minor adjustments
X-Git-Tag: v1.85~484
X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=385a849102d74ac187a9c145d5df5fad9385fc1b;p=picodrive.git

minor adjustments

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@466 be3aeb3a-fb24-0410-a615-afba39da0efa
---

diff --git a/Pico/PicoFrameHints.c b/Pico/PicoFrameHints.c
index 0d414b23..76ba0ff4 100644
--- a/Pico/PicoFrameHints.c
+++ b/Pico/PicoFrameHints.c
@@ -116,9 +116,7 @@ static int PicoFrameHints(void)
       }
       else
       {
-#if CAN_HANDLE_240_LINES
-        if (((!(pv->reg[1]&8) && y < 224) || (pv->reg[1]&8)) )
-#else
+#if !CAN_HANDLE_240_LINES
         if (y < 224)
 #endif
           PicoLine(y);
diff --git a/platform/gp2x/menu.c b/platform/gp2x/menu.c
index 0a4cb73b..4b3201e5 100644
--- a/platform/gp2x/menu.c
+++ b/platform/gp2x/menu.c
@@ -46,16 +46,16 @@ static int inp_prevjoy = 0;
 static unsigned long wait_for_input(unsigned long interesting)
 {
 	unsigned long ret;
-	static int repeats = 0, wait = 50*1000;
+	static int repeats = 0, wait = 6;
 	int release = 0, i;
 
-	if (repeats == 2 || repeats == 4) wait /= 2;
-	if (repeats == 6) wait = 15 * 1000;
+	if      (repeats == 2) wait = 3;
+	else if (repeats == 4) wait = 2;
+	else if (repeats == 6) wait = 1;
 
-	for (i = 0; i < 6 && inp_prev == gp2x_joystick_read(1); i++) {
+	for (i = 0; i < wait && inp_prev == gp2x_joystick_read(1); i++) {
 		if (i == 0) repeats++;
-		if (wait >= 30*1000) usleep(wait); // usleep sleeps for ~30ms minimum
-		else spend_cycles(wait * currentConfig.CPUclock);
+		usleep(30000);
 	}
 
 	while ( !((ret = gp2x_joystick_read(1)) & interesting) ) {
@@ -65,7 +65,7 @@ static unsigned long wait_for_input(unsigned long interesting)
 
 	if (release || ret != inp_prev) {
 		repeats = 0;
-		wait = 50*1000;
+		wait = 6;
 	}
 	inp_prev = ret;
 	inp_prevjoy = 0;