summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/credits.c63
-rw-r--r--apps/credits.h7
2 files changed, 38 insertions, 32 deletions
diff --git a/apps/credits.c b/apps/credits.c
index f454fd9898..de27af2550 100644
--- a/apps/credits.c
+++ b/apps/credits.c
@@ -21,10 +21,12 @@
21#include "lcd.h" 21#include "lcd.h"
22#include "kernel.h" 22#include "kernel.h"
23 23
24#define DISPLAY_TIME 200 24struct credit {
25 char *name;
26 char *desc;
27};
25 28
26struct credit credits[CREDIT_COUNT] = { 29struct credit credits[] = {
27 { "[Credits]", "" },
28 { "Bjorn Stenberg", "Originator, project manager, code" }, 30 { "Bjorn Stenberg", "Originator, project manager, code" },
29 { "Linus Nielsen Feltzing", "Electronics, code" }, 31 { "Linus Nielsen Feltzing", "Electronics, code" },
30 { "Andy Choi", "Checksums" }, 32 { "Andy Choi", "Checksums" },
@@ -47,38 +49,49 @@ struct credit credits[CREDIT_COUNT] = {
47 { "Stefan Meyer", "Code" }, 49 { "Stefan Meyer", "Code" },
48}; 50};
49 51
52#ifdef HAVE_LCD_BITMAP
53#define MAX_LINES 6
54#define DISPLAY_TIME HZ*2
55#else
56#define MAX_LINES 2
57#define DISPLAY_TIME HZ
58#endif
59
50void show_credits(void) 60void show_credits(void)
51{ 61{
52 int i = 0; 62 int i,j;
53 int line = 0; 63 int line = 0;
54 64
55 lcd_clear_display(); 65 lcd_clear_display();
56 66#ifdef HAVE_LCD_BITMAP
57 while(i < CREDIT_COUNT-1) { 67 lcd_setmargins(0,9);
58 if ((line % 4 == 0) && (line!=0)) { 68#endif
59 lcd_puts(0, 0, (char *)credits[0].name); 69
70 for ( i=0; i<sizeof(credits)/sizeof(struct credit); i++ ) {
71#ifdef HAVE_LCD_BITMAP
72 lcd_putsxy(0, 0, " [Credits]",0);
73#endif
74 lcd_puts(0, line, credits[i].name);
75 line++;
76 if ( line == MAX_LINES ) {
60 lcd_update(); 77 lcd_update();
61 sleep(DISPLAY_TIME); 78 /* abort on keypress */
79 for ( j=0;j<10;j++ ) {
80 sleep(DISPLAY_TIME/10);
81 if (button_get())
82 return;
83 }
62 lcd_clear_display(); 84 lcd_clear_display();
63 line=0; 85 line=0;
64 } 86 }
65 lcd_puts(0, ++line, (char *)credits[++i].name);
66 } 87 }
67 88 if ( line != MAX_LINES ) {
68 if ((i-1)%4 != 0) {
69 lcd_puts(0, 0, (char *)credits[0].name);
70 lcd_update(); 89 lcd_update();
71 sleep(DISPLAY_TIME); 90 /* abort on keypress */
72 lcd_clear_display(); 91 for ( j=0;j<10;j++ ) {
92 sleep(DISPLAY_TIME/10);
93 if (button_get())
94 return;
95 }
73 } 96 }
74
75} 97}
76
77
78
79
80
81
82
83
84
diff --git a/apps/credits.h b/apps/credits.h
index d109e55dde..36f16170cb 100644
--- a/apps/credits.h
+++ b/apps/credits.h
@@ -20,13 +20,6 @@
20#ifndef __ROCKBOX_CREDITS_H__ 20#ifndef __ROCKBOX_CREDITS_H__
21#define __ROCKBOX_CREDITS_H__ 21#define __ROCKBOX_CREDITS_H__
22 22
23#define CREDIT_COUNT 21
24
25struct credit {
26 const char *name;
27 const char *desc;
28};
29
30/* Show who worked on the project */ 23/* Show who worked on the project */
31void show_credits(void); 24void show_credits(void);
32 25