-#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);
if (y < 224)
#endif
PicoLine(y);
static unsigned long wait_for_input(unsigned long interesting)\r
{\r
unsigned long ret;\r
static unsigned long wait_for_input(unsigned long interesting)\r
{\r
unsigned long ret;\r
- static int repeats = 0, wait = 50*1000;\r
+ static int repeats = 0, wait = 6;\r
- if (repeats == 2 || repeats == 4) wait /= 2;\r
- if (repeats == 6) wait = 15 * 1000;\r
+ if (repeats == 2) wait = 3;\r
+ else if (repeats == 4) wait = 2;\r
+ else if (repeats == 6) wait = 1;\r
- for (i = 0; i < 6 && inp_prev == gp2x_joystick_read(1); i++) {\r
+ for (i = 0; i < wait && inp_prev == gp2x_joystick_read(1); i++) {\r
- if (wait >= 30*1000) usleep(wait); // usleep sleeps for ~30ms minimum\r
- else spend_cycles(wait * currentConfig.CPUclock);\r
}\r
\r
while ( !((ret = gp2x_joystick_read(1)) & interesting) ) {\r
}\r
\r
while ( !((ret = gp2x_joystick_read(1)) & interesting) ) {\r
\r
if (release || ret != inp_prev) {\r
repeats = 0;\r
\r
if (release || ret != inp_prev) {\r
repeats = 0;\r
}\r
inp_prev = ret;\r
inp_prevjoy = 0;\r
}\r
inp_prev = ret;\r
inp_prevjoy = 0;\r