diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-06-21 10:38:50 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2024-06-30 02:09:40 -0400 |
commit | dc7486c7de3018b78fcfeafe7a1cc5c9da168494 (patch) | |
tree | ca5326e18d88f650e8132c2b9760199701448df2 /apps/misc.c | |
parent | c87c09658a7d65249affe3e8a814bd278998bb42 (diff) | |
download | rockbox-dc7486c7de3018b78fcfeafe7a1cc5c9da168494.tar.gz rockbox-dc7486c7de3018b78fcfeafe7a1cc5c9da168494.zip |
[Feature] onplay.c show file progress
first some clean-up of onplay.c
extend/move fileobject copy, move, delete routines in prep for other users
add error checking, better error codes
pre scan to make sure the operation doesn't exceed system resources
show progress for file and directory copies
Change-Id: Ife2e62df554892dab651bab40433bf70b27e73ff
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/misc.c b/apps/misc.c index dd73c98a69..d8caabd397 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -1999,4 +1999,22 @@ long from_normalized_volume(long norm, long min_vol, long max_vol, long max_norm | |||
1999 | 1999 | ||
2000 | return vol >> NVOL_FRACBITS; | 2000 | return vol >> NVOL_FRACBITS; |
2001 | } | 2001 | } |
2002 | |||
2003 | void clear_screen_buffer(bool update) | ||
2004 | { | ||
2005 | struct viewport vp; | ||
2006 | struct viewport *last_vp; | ||
2007 | FOR_NB_SCREENS(i) | ||
2008 | { | ||
2009 | struct screen * screen = &screens[i]; | ||
2010 | viewport_set_defaults(&vp, screen->screen_type); | ||
2011 | last_vp = screen->set_viewport(&vp); | ||
2012 | screen->clear_viewport(); | ||
2013 | if (update) { | ||
2014 | screen->update_viewport(); | ||
2015 | } | ||
2016 | screen->set_viewport(last_vp); | ||
2017 | } | ||
2018 | } | ||
2019 | |||
2002 | #endif /* ndef __PCTOOL__ */ | 2020 | #endif /* ndef __PCTOOL__ */ |