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.zip
rockbox-220f69c24ec6477aeee403d3cbecc9d1569db28a.tar.gz
rockbox-220f69c24ec6477aeee403d3cbecc9d1569db28a.tar.bz2
rockbox-220f69c24ec6477aeee403d3cbecc9d1569db28a.tar.xz
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 e3eb240..3231218 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -25,6 +25,7 @@
#include "kernel.h"
#include "main_menu.h"
#include "sound_menu.h"
+#include "version.h"
#ifdef HAVE_LCD_BITMAP
#include "screensaver.h"
@@ -85,7 +86,6 @@ static int show_logo(void)
void show_splash(void)
{
- int i;
char *rockbox = "ROCKbox!";
lcd_clear_display();
@@ -99,11 +99,19 @@ void show_splash(void)
lcd_update();
}
+void version(void)
+{
+ lcd_clear_display();
+ lcd_puts(0,0,appsversion);
+ lcd_update();
+ sleep(HZ);
+}
+
void main_menu(void)
{
int m;
enum {
- Tetris, Screen_Saver, Splash, Credits, Sound
+ Tetris, Screen_Saver, Splash, Credits, Sound, Version
};
/* main menu */
@@ -114,7 +122,8 @@ void main_menu(void)
{ Screen_Saver, "Screen Saver", screensaver },
#endif
{ Splash, "Splash", show_splash },
- { Credits, "Credits", show_credits }
+ { Credits, "Credits", show_credits },
+ { Version, "Version", version }
};
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
diff --git a/apps/version.h b/apps/version.h
index 6837752..b60d1ca 100644
--- a/apps/version.h
+++ b/apps/version.h
@@ -1 +1,25 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2002 Björn Stenberg
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#ifndef _VERSION_H_
+#define _VERSION_H_
+
#define APPSVERSION "0.1"
+extern char appsversion[];
+
+#endif