From c2779e5ef3740781c30b8c2b5d9f876709b091d9 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 9 Sep 2005 07:07:44 +0000 Subject: Patch #1285659 by Stephan Wezel, adds the %bp tag to the WPS (external power adapter) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7501 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps-display.c | 9 +++++++++ docs/CREDITS | 1 + 2 files changed, 10 insertions(+) diff --git a/apps/wps-display.c b/apps/wps-display.c index b5f95a43d7..1794e53549 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c @@ -41,6 +41,7 @@ #include "mas.h" #include "lang.h" #include "powermgmt.h" +#include "power.h" #include "sprintf.h" #include "backlight.h" #include "button.h" @@ -791,6 +792,14 @@ static char* get_tag(struct mp3entry* cid3, strncpy(buf, "?h ?m", buf_size); return buf; } + + case 'p': /* External power plugged in? */ + { + if(charger_inserted()) + return "p"; + else + return NULL; + } } break; diff --git a/docs/CREDITS b/docs/CREDITS index 8ecabe347e..5db682eb72 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -134,3 +134,4 @@ Naftali Goldstein David Dent Frank Dischner Liberman Shachar +Stephan Wezel -- cgit v1.2.3