From 8102f3da270ce5a442523a1738318493906bb86a Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 2 Jul 2005 10:50:42 +0000 Subject: New option to enable/disable the runtime database. Moved the runtimedb init to a more appropriate place and added proper USB handling. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6984 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings_menu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'apps/settings_menu.c') diff --git a/apps/settings_menu.c b/apps/settings_menu.c index d7bf96aaff..3de8fa4b70 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -46,6 +46,7 @@ #include "timefuncs.h" #include "misc.h" #include "power.h" +#include "database.h" #ifdef HAVE_LCD_BITMAP #include "peakmeter.h" @@ -1124,6 +1125,24 @@ static bool next_folder(void) return set_bool( str(LANG_NEXT_FOLDER), &global_settings.next_folder ); } +static bool runtimedb(void) +{ + bool rc; + bool old = global_settings.runtimedb; + + rc = set_bool_options( str(LANG_RUNTIMEDB_ACTIVE), + &global_settings.runtimedb, + STR(LANG_SET_BOOL_YES), + STR(LANG_SET_BOOL_NO), + NULL); + if (old && !global_settings.runtimedb) + rundb_shutdown(); + if (!old && global_settings.runtimedb) + rundb_init(); + + return rc; +} + static bool playback_settings_menu(void) { int m; @@ -1145,6 +1164,7 @@ static bool playback_settings_menu(void) #endif { ID2P(LANG_ID3_ORDER), id3_order }, { ID2P(LANG_NEXT_FOLDER), next_folder }, + { ID2P(LANG_RUNTIMEDB_ACTIVE), runtimedb }, }; bool old_shuffle = global_settings.playlist_shuffle; -- cgit v1.2.3