summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-03-05 07:11:38 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-03-05 07:11:38 +0000
commitd93d20f6a46410d889ab67dd2514119121dda386 (patch)
tree11de7d9d52f1c2340b9b533c423bc0883efb4cf1 /apps
parent454379a10ba39fb453419d5fbf252da5efefcb23 (diff)
downloadrockbox-d93d20f6a46410d889ab67dd2514119121dda386.tar.gz
rockbox-d93d20f6a46410d889ab67dd2514119121dda386.tar.bz2
rockbox-d93d20f6a46410d889ab67dd2514119121dda386.zip
for upcoming release: no diagnostic screen unless underruns happened
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4339 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/video.c47
1 files changed, 26 insertions, 21 deletions
diff --git a/apps/plugins/video.c b/apps/plugins/video.c
index a44b9c6354..bcb160e0b6 100644
--- a/apps/plugins/video.c
+++ b/apps/plugins/video.c
@@ -759,7 +759,7 @@ int main(char* filename)
int file_size;
int fd; /* file descriptor handle */
int read_now, got_now;
- int button;
+ int button = 0;
int retval;
// try to open the file
@@ -865,27 +865,32 @@ int main(char* filename)
return PLUGIN_USB_CONNECTED;
}
- // display statistics
- rb->lcd_clear_display();
- rb->snprintf(gPrint, sizeof(gPrint), "%d Audio Underruns", gStats.nAudioUnderruns);
- rb->lcd_puts(0, 0, gPrint);
- rb->snprintf(gPrint, sizeof(gPrint), "%d Video Underruns", gStats.nVideoUnderruns);
- rb->lcd_puts(0, 1, gPrint);
- rb->snprintf(gPrint, sizeof(gPrint), "%d MinAudio bytes", gStats.minAudioAvail);
- rb->lcd_puts(0, 2, gPrint);
- rb->snprintf(gPrint, sizeof(gPrint), "%d MinVideo bytes", gStats.minVideoAvail);
- rb->lcd_puts(0, 3, gPrint);
- rb->snprintf(gPrint, sizeof(gPrint), "ReadChunk: %d", gBuf.nReadChunk);
- rb->lcd_puts(0, 4, gPrint);
- rb->snprintf(gPrint, sizeof(gPrint), "SeekChunk: %d", gBuf.nSeekChunk);
- rb->lcd_puts(0, 5, gPrint);
- rb->snprintf(gPrint, sizeof(gPrint), "LowWater: %d", gBuf.low_water);
- rb->lcd_puts(0, 6, gPrint);
- rb->snprintf(gPrint, sizeof(gPrint), "HighWater: %d", gBuf.high_water);
- rb->lcd_puts(0, 7, gPrint);
+#ifndef DEBUG // for release compilations, only display the stats in case of error
+ if (gStats.nAudioUnderruns || gStats.nVideoUnderruns)
+#endif
+ {
+ // display statistics
+ rb->lcd_clear_display();
+ rb->snprintf(gPrint, sizeof(gPrint), "%d Audio Underruns", gStats.nAudioUnderruns);
+ rb->lcd_puts(0, 0, gPrint);
+ rb->snprintf(gPrint, sizeof(gPrint), "%d Video Underruns", gStats.nVideoUnderruns);
+ rb->lcd_puts(0, 1, gPrint);
+ rb->snprintf(gPrint, sizeof(gPrint), "%d MinAudio bytes", gStats.minAudioAvail);
+ rb->lcd_puts(0, 2, gPrint);
+ rb->snprintf(gPrint, sizeof(gPrint), "%d MinVideo bytes", gStats.minVideoAvail);
+ rb->lcd_puts(0, 3, gPrint);
+ rb->snprintf(gPrint, sizeof(gPrint), "ReadChunk: %d", gBuf.nReadChunk);
+ rb->lcd_puts(0, 4, gPrint);
+ rb->snprintf(gPrint, sizeof(gPrint), "SeekChunk: %d", gBuf.nSeekChunk);
+ rb->lcd_puts(0, 5, gPrint);
+ rb->snprintf(gPrint, sizeof(gPrint), "LowWater: %d", gBuf.low_water);
+ rb->lcd_puts(0, 6, gPrint);
+ rb->snprintf(gPrint, sizeof(gPrint), "HighWater: %d", gBuf.high_water);
+ rb->lcd_puts(0, 7, gPrint);
- rb->lcd_update();
- button = WaitForButton();
+ rb->lcd_update();
+ button = WaitForButton();
+ }
return (button == SYS_USB_CONNECTED) ? PLUGIN_USB_CONNECTED : PLUGIN_OK;
}