notaz.gp2x.de
/
libpicofe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfixes, state load for new mode
[libpicofe.git]
/
gp2x
/
menu.c
diff --git
a/gp2x/menu.c
b/gp2x/menu.c
index
0a4cb73
..
4b3201e
100644
(file)
--- a/
gp2x/menu.c
+++ b/
gp2x/menu.c
@@
-46,16
+46,16
@@
static int inp_prevjoy = 0;
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
int release = 0, i;
\r
\r
int release = 0, i;
\r
\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
\r
\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 (i == 0) repeats++;
\r
if (i == 0) repeats++;
\r
- if (wait >= 30*1000) usleep(wait); // usleep sleeps for ~30ms minimum
\r
- else spend_cycles(wait * currentConfig.CPUclock);
\r
+ usleep(30000);
\r
}
\r
\r
while ( !((ret = gp2x_joystick_read(1)) & interesting) ) {
\r
}
\r
\r
while ( !((ret = gp2x_joystick_read(1)) & interesting) ) {
\r
@@
-65,7
+65,7
@@
static unsigned long wait_for_input(unsigned long interesting)
\r
if (release || ret != inp_prev) {
\r
repeats = 0;
\r
\r
if (release || ret != inp_prev) {
\r
repeats = 0;
\r
- wait =
50*1000
;
\r
+ wait =
6
;
\r
}
\r
inp_prev = ret;
\r
inp_prevjoy = 0;
\r
}
\r
inp_prev = ret;
\r
inp_prevjoy = 0;
\r