logo       

amiconn: apps/plugins calculator.c, 1.7, 1.8 euroconverter.c, 1.9, 1.10 jac: msg#00169

systems.archos.rockbox.cvs

Subject: amiconn: apps/plugins calculator.c, 1.7, 1.8 euroconverter.c, 1.9, 1.10 jackpot.c, 1.2, 1.3 jpeg.c, 1.15, 1.16 nim.c, 1.3, 1.4 viewer.c, 1.7, 1.8

Update of /cvsroot/rockbox/apps/plugins
In directory labb:/tmp/cvs-serv10526/apps/plugins

Modified Files:
calculator.c euroconverter.c jackpot.c jpeg.c nim.c viewer.c
Log Message:
Changed several places to use button_clear_queue() to empty the button queue.
Added the ability to empty the (system's) button queue to the X11 simulatr.

Index: nim.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/nim.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- nim.c 22 Oct 2004 00:21:58 -0000 1.3
+++ nim.c 26 Jan 2005 22:48:25 -0000 1.4
@@ -174,7 +174,7 @@
min=0;

/*Empty the event queue*/
- while (rb->button_get(false)!=BUTTON_NONE);
+ rb->button_clear_queue();

/* Game loop */
while(end!=true)

Index: calculator.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/calculator.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- calculator.c 2 Jan 2005 09:20:24 -0000 1.7
+++ calculator.c 26 Jan 2005 22:48:25 -0000 1.8
@@ -397,7 +397,7 @@
printResult();

/* clear button queue */
- while (rb->button_get(false));
+ rb->button_clear_queue();
}

/* -----------------------------------------------------------------------
@@ -1357,7 +1357,7 @@
} /* while (calStatus != cal_exit ) */

/* rb->splash(HZ*2, true, "Hello world!"); */
- while (rb->button_get(false));
+ rb->button_clear_queue();
return PLUGIN_OK;
}


Index: viewer.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/viewer.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- viewer.c 16 Oct 2004 00:07:43 -0000 1.7
+++ viewer.c 26 Jan 2005 22:48:25 -0000 1.8
@@ -356,7 +356,7 @@

rb->lseek(fd, pos, SEEK_SET);
numread = rb->read(fd, buf, size);
- while (rb->button_get(false)); /* clear button queue */
+ rb->button_clear_queue(); /* clear button queue */

for(i = 0; i < numread; i++) {
switch(buf[i]) {

Index: euroconverter.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/euroconverter.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- euroconverter.c 13 Jan 2005 11:06:08 -0000 1.9
+++ euroconverter.c 26 Jan 2005 22:48:25 -0000 1.10
@@ -437,7 +437,7 @@
load_config();

/*Empty the event queue*/
- while (rb->button_get(false)!=BUTTON_NONE) ;
+ rb->button_clear_queue();

display(e,h,false);
show_abbrev();

Index: jpeg.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/jpeg.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- jpeg.c 16 Oct 2004 00:07:43 -0000 1.15
+++ jpeg.c 26 Jan 2005 22:48:25 -0000 1.16
@@ -1520,7 +1520,7 @@
int lastbutton = 0;

/*empty the button queue first, to avoid unwanted scrolling */
- while(rb->button_get(false) != BUTTON_NONE);
+ rb->button_clear_queue();

while (true)
{

Index: jackpot.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/jackpot.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- jackpot.c 22 Oct 2004 00:21:58 -0000 1.2
+++ jackpot.c 26 Jan 2005 22:48:25 -0000 1.3
@@ -125,7 +125,7 @@
rb->lcd_puts_scroll(0,1,"PLAY to begin");

/*Empty the event queue*/
- while (rb->button_get(false)!=BUTTON_NONE);
+ rb->button_clear_queue();

/* Define the start pattern */
s[0]=(rb->rand()%9)*7;

_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox-cvs



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise