summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-05-29 10:55:49 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-05-29 10:55:49 +0000
commit220f69c24ec6477aeee403d3cbecc9d1569db28a (patch)
treeba07b87769c413f45deaf589cf37974bb8a734d6
parentf779e26c89f3f419af82dd18561fc5f00a5da491 (diff)
downloadrockbox-220f69c24ec6477aeee403d3cbecc9d1569db28a.tar.gz
rockbox-220f69c24ec6477aeee403d3cbecc9d1569db28a.zip
Added version display to menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@787 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/main_menu.c15
-rw-r--r--apps/version.h24
2 files changed, 36 insertions, 3 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c
index e3eb240b1d..32312183d0 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -25,6 +25,7 @@
25#include "kernel.h" 25#include "kernel.h"
26#include "main_menu.h" 26#include "main_menu.h"
27#include "sound_menu.h" 27#include "sound_menu.h"
28#include "version.h"
28 29
29#ifdef HAVE_LCD_BITMAP 30#ifdef HAVE_LCD_BITMAP
30#include "screensaver.h" 31#include "screensaver.h"
@@ -85,7 +86,6 @@ static int show_logo(void)
85 86
86void show_splash(void) 87void show_splash(void)
87{ 88{
88 int i;
89 char *rockbox = "ROCKbox!"; 89 char *rockbox = "ROCKbox!";
90 lcd_clear_display(); 90 lcd_clear_display();
91 91
@@ -99,11 +99,19 @@ void show_splash(void)
99 lcd_update(); 99 lcd_update();
100} 100}
101 101
102void version(void)
103{
104 lcd_clear_display();
105 lcd_puts(0,0,appsversion);
106 lcd_update();
107 sleep(HZ);
108}
109
102void main_menu(void) 110void main_menu(void)
103{ 111{
104 int m; 112 int m;
105 enum { 113 enum {
106 Tetris, Screen_Saver, Splash, Credits, Sound 114 Tetris, Screen_Saver, Splash, Credits, Sound, Version
107 }; 115 };
108 116
109 /* main menu */ 117 /* main menu */
@@ -114,7 +122,8 @@ void main_menu(void)
114 { Screen_Saver, "Screen Saver", screensaver }, 122 { Screen_Saver, "Screen Saver", screensaver },
115#endif 123#endif
116 { Splash, "Splash", show_splash }, 124 { Splash, "Splash", show_splash },
117 { Credits, "Credits", show_credits } 125 { Credits, "Credits", show_credits },
126 { Version, "Version", version }
118 }; 127 };
119 128
120 m=menu_init( items, sizeof items / sizeof(struct menu_items) ); 129 m=menu_init( items, sizeof items / sizeof(struct menu_items) );
diff --git a/apps/version.h b/apps/version.h
index 6837752e88..b60d1ca661 100644
--- a/apps/version.h
+++ b/apps/version.h
@@ -1 +1,25 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Björn Stenberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef _VERSION_H_
20#define _VERSION_H_
21
1#define APPSVERSION "0.1" 22#define APPSVERSION "0.1"
23extern char appsversion[];
24
25#endif