diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-01-26 22:48:25 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-01-26 22:48:25 +0000 |
commit | 3c348df5cafaf5d893c610fd2caf8234abe5cf88 (patch) | |
tree | 631a926bffd197b48c9e4edb8b568319808e74b7 /apps/plugins | |
parent | 99d2a4b43642aef2ff859ed8195b62d3b2110a26 (diff) | |
download | rockbox-3c348df5cafaf5d893c610fd2caf8234abe5cf88.tar.gz rockbox-3c348df5cafaf5d893c610fd2caf8234abe5cf88.zip |
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.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5665 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/calculator.c | 4 | ||||
-rw-r--r-- | apps/plugins/euroconverter.c | 2 | ||||
-rw-r--r-- | apps/plugins/jackpot.c | 2 | ||||
-rw-r--r-- | apps/plugins/jpeg.c | 2 | ||||
-rw-r--r-- | apps/plugins/nim.c | 2 | ||||
-rw-r--r-- | apps/plugins/viewer.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c index 04231f471e..193ac8a7ce 100644 --- a/apps/plugins/calculator.c +++ b/apps/plugins/calculator.c | |||
@@ -397,7 +397,7 @@ void cal_initial (void) | |||
397 | printResult(); | 397 | printResult(); |
398 | 398 | ||
399 | /* clear button queue */ | 399 | /* clear button queue */ |
400 | while (rb->button_get(false)); | 400 | rb->button_clear_queue(); |
401 | } | 401 | } |
402 | 402 | ||
403 | /* ----------------------------------------------------------------------- | 403 | /* ----------------------------------------------------------------------- |
@@ -1357,7 +1357,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
1357 | } /* while (calStatus != cal_exit ) */ | 1357 | } /* while (calStatus != cal_exit ) */ |
1358 | 1358 | ||
1359 | /* rb->splash(HZ*2, true, "Hello world!"); */ | 1359 | /* rb->splash(HZ*2, true, "Hello world!"); */ |
1360 | while (rb->button_get(false)); | 1360 | rb->button_clear_queue(); |
1361 | return PLUGIN_OK; | 1361 | return PLUGIN_OK; |
1362 | } | 1362 | } |
1363 | 1363 | ||
diff --git a/apps/plugins/euroconverter.c b/apps/plugins/euroconverter.c index 0a01f3a1d6..3fb1e0e819 100644 --- a/apps/plugins/euroconverter.c +++ b/apps/plugins/euroconverter.c | |||
@@ -437,7 +437,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
437 | load_config(); | 437 | load_config(); |
438 | 438 | ||
439 | /*Empty the event queue*/ | 439 | /*Empty the event queue*/ |
440 | while (rb->button_get(false)!=BUTTON_NONE) ; | 440 | rb->button_clear_queue(); |
441 | 441 | ||
442 | display(e,h,false); | 442 | display(e,h,false); |
443 | show_abbrev(); | 443 | show_abbrev(); |
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index e392c3b35a..d35e35a8c0 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c | |||
@@ -125,7 +125,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
125 | rb->lcd_puts_scroll(0,1,"PLAY to begin"); | 125 | rb->lcd_puts_scroll(0,1,"PLAY to begin"); |
126 | 126 | ||
127 | /*Empty the event queue*/ | 127 | /*Empty the event queue*/ |
128 | while (rb->button_get(false)!=BUTTON_NONE); | 128 | rb->button_clear_queue(); |
129 | 129 | ||
130 | /* Define the start pattern */ | 130 | /* Define the start pattern */ |
131 | s[0]=(rb->rand()%9)*7; | 131 | s[0]=(rb->rand()%9)*7; |
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index c601712b11..d760812b86 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c | |||
@@ -1520,7 +1520,7 @@ int scroll_bmp(struct t_disp* pdisp) | |||
1520 | int lastbutton = 0; | 1520 | int lastbutton = 0; |
1521 | 1521 | ||
1522 | /*empty the button queue first, to avoid unwanted scrolling */ | 1522 | /*empty the button queue first, to avoid unwanted scrolling */ |
1523 | while(rb->button_get(false) != BUTTON_NONE); | 1523 | rb->button_clear_queue(); |
1524 | 1524 | ||
1525 | while (true) | 1525 | while (true) |
1526 | { | 1526 | { |
diff --git a/apps/plugins/nim.c b/apps/plugins/nim.c index 48e0937908..27f1210ea4 100644 --- a/apps/plugins/nim.c +++ b/apps/plugins/nim.c | |||
@@ -174,7 +174,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
174 | min=0; | 174 | min=0; |
175 | 175 | ||
176 | /*Empty the event queue*/ | 176 | /*Empty the event queue*/ |
177 | while (rb->button_get(false)!=BUTTON_NONE); | 177 | rb->button_clear_queue(); |
178 | 178 | ||
179 | /* Game loop */ | 179 | /* Game loop */ |
180 | while(end!=true) | 180 | while(end!=true) |
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index 4628f8e7b3..281868bf65 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -356,7 +356,7 @@ static void fill_buffer(long pos, unsigned char* buf, unsigned size) | |||
356 | 356 | ||
357 | rb->lseek(fd, pos, SEEK_SET); | 357 | rb->lseek(fd, pos, SEEK_SET); |
358 | numread = rb->read(fd, buf, size); | 358 | numread = rb->read(fd, buf, size); |
359 | while (rb->button_get(false)); /* clear button queue */ | 359 | rb->button_clear_queue(); /* clear button queue */ |
360 | 360 | ||
361 | for(i = 0; i < numread; i++) { | 361 | for(i = 0; i < numread; i++) { |
362 | switch(buf[i]) { | 362 | switch(buf[i]) { |