summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMarcoen Hirschberg <marcoen@gmail.com>2007-06-19 21:30:45 +0000
committerMarcoen Hirschberg <marcoen@gmail.com>2007-06-19 21:30:45 +0000
commit3585ee7a3f5db5d635f5ce9a4a396a4242851da0 (patch)
tree898ae286890055766c6b83c615fddf71ba6ef8d9 /apps
parent95d414542c434043afbba51a566ebe66fc39949c (diff)
downloadrockbox-3585ee7a3f5db5d635f5ce9a4a396a4242851da0.tar.gz
rockbox-3585ee7a3f5db5d635f5ce9a4a396a4242851da0.tar.bz2
rockbox-3585ee7a3f5db5d635f5ce9a4a396a4242851da0.zip
change the fps calculation so setting changes are visible without delay
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13678 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 4618706210..7e18ab4963 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -166,6 +166,8 @@ struct plugin_api* rb;
static mpeg2dec_t * mpeg2dec;
static int total_offset = 0;
+static int num_drawn = 0;
+static int count_start = 0;
/* Utility */
@@ -906,6 +908,8 @@ static void button_loop(void)
gray_show(false);
#endif
result = mpeg_menu();
+ count_start = get_playback_time();
+ num_drawn = 0;
#ifndef HAVE_LCD_COLOR
gray_show(true);
@@ -1266,7 +1270,6 @@ static void video_thread(void)
int frame_drop_level = 0;
int skip_level = 0;
int num_skipped = 0;
- int num_drawn = 0;
/* Used to decide when to display FPS */
unsigned long last_showfps = *rb->current_tick - HZ;
/* Used to decide whether or not to force a frame update */
@@ -1568,7 +1571,7 @@ static void video_thread(void)
/* Calculate and display fps */
if (TIME_AFTER(*rb->current_tick, last_showfps + HZ))
{
- uint32_t clock_ticks = get_playback_time();
+ uint32_t clock_ticks = get_playback_time() - count_start;
int fps = 0;
if (clock_ticks != 0)