5 #include <drivers/fatfs/ff.h>
7 #define VANITY_IMAGE_FILE "/vanity.dat"
9 void badge_vanity_read_from_fd(FIL
*fd
, badge_framebuffer
*dest
) {
11 f_read(fd
, dest
, sizeof(*dest
), &bytes
);
14 void badge_vanity_show(void) {
18 unsigned min_ticks
= 50;
20 if(FR_OK
== f_open(&fd
, VANITY_IMAGE_FILE
, FA_OPEN_EXISTING
| FA_READ
)) {
21 badge_vanity_read_from_fd(&fd
, &fb
);
24 badge_framebuffer_flush(&fb
);
29 ev
= badge_event_wait();
31 if(badge_event_type(ev
) == BADGE_EVENT_GAME_TICK
) {
34 } while(min_ticks
!= 0);
37 ev
= badge_event_wait();
38 } while(badge_event_type(ev
) != BADGE_EVENT_USER_INPUT
);
This page took 0.050923 seconds and 5 git commands to generate.