projects
/
hackover2013-badge-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pinconfig für Endbadge.
[hackover2013-badge-firmware.git]
/
badge
/
ui
/
vanity.c
diff --git
a/badge/ui/vanity.c
b/badge/ui/vanity.c
index
b2bebbd
..
9ca7001
100644
(file)
--- a/
badge/ui/vanity.c
+++ b/
badge/ui/vanity.c
@@
-4,7
+4,7
@@
#include "event.h"
#include <drivers/fatfs/ff.h>
#include "event.h"
#include <drivers/fatfs/ff.h>
-#define VANITY_IMAGE_FILE "/
vanity
.dat"
+#define VANITY_IMAGE_FILE "/
titleimg
.dat"
void badge_vanity_read_from_fd(FIL *fd, badge_framebuffer *dest) {
UINT bytes;
void badge_vanity_read_from_fd(FIL *fd, badge_framebuffer *dest) {
UINT bytes;
@@
-15,6
+15,8
@@
void badge_vanity_show(void) {
FIL fd;
badge_framebuffer fb;
FIL fd;
badge_framebuffer fb;
+ unsigned min_ticks = 50;
+
if(FR_OK == f_open(&fd, VANITY_IMAGE_FILE, FA_OPEN_EXISTING | FA_READ)) {
badge_vanity_read_from_fd(&fd, &fb);
f_close(&fd);
if(FR_OK == f_open(&fd, VANITY_IMAGE_FILE, FA_OPEN_EXISTING | FA_READ)) {
badge_vanity_read_from_fd(&fd, &fb);
f_close(&fd);
@@
-22,10
+24,17
@@
void badge_vanity_show(void) {
badge_framebuffer_flush(&fb);
badge_event_t ev;
badge_framebuffer_flush(&fb);
badge_event_t ev;
+
do {
ev = badge_event_wait();
do {
ev = badge_event_wait();
- } while(badge_event_type(ev) != BADGE_EVENT_USER_INPUT);
- for(;;);
+ if(badge_event_type(ev) == BADGE_EVENT_GAME_TICK) {
+ --min_ticks;
+ }
+ } while(min_ticks != 0);
+
+ do {
+ ev = badge_event_wait();
+ } while(badge_event_type(ev) != BADGE_EVENT_USER_INPUT);
}
}
}
}
This page took
0.029784 seconds
and
4
git commands to generate.