From 220f69c24ec6477aeee403d3cbecc9d1569db28a Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Wed, 29 May 2002 10:55:49 +0000 Subject: Added version display to menu git-svn-id: svn://svn.rockbox.org/rockbox/trunk@787 a1c6a512-1295-4272-9138-f99709370657 --- apps/main_menu.c | 15 ++++++++++++--- apps/version.h | 24 ++++++++++++++++++++++++ 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 @@ #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 6837752e88..b60d1ca661 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 -- cgit v1.2.3