1
0
Fork 0
forked from len0rd/rockbox

Added version display to menu

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@787 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-05-29 10:55:49 +00:00
parent f779e26c89
commit 220f69c24e
2 changed files with 36 additions and 3 deletions

View file

@ -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) );

View file

@ -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