summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/gwps-common.c27
-rw-r--r--apps/gui/gwps.h3
2 files changed, 28 insertions, 2 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index d6d765f418..ca839a9bfa 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -510,6 +510,26 @@ static char* get_tag(struct wps_data* wps_data,
510 wps_data->full_line_progressbar=0; 510 wps_data->full_line_progressbar=0;
511 return buf; 511 return buf;
512#else 512#else
513 char *p=strchr(tag, '|');
514 if (p) {
515 wps_data->progress_height=atoi(++p);
516 p=strchr(p, '|');
517 if (p) {
518 wps_data->progress_start=atoi(++p);
519 p=strchr(p, '|');
520 if (p)
521 wps_data->progress_end=atoi(++p);
522 else
523 wps_data->progress_end=NULL;
524 }else {
525 wps_data->progress_start=0;
526 wps_data->progress_end=NULL;
527 }
528 }else {
529 wps_data->progress_height=6;
530 wps_data->progress_start=0;
531 wps_data->progress_end=NULL;
532 }
513 return "\x01"; 533 return "\x01";
514#endif 534#endif
515 case 'f': /* full-line progress bar */ 535 case 'f': /* full-line progress bar */
@@ -1449,9 +1469,12 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
1449 /* progress */ 1469 /* progress */
1450 if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) 1470 if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS)
1451 { 1471 {
1452#define PROGRESS_BAR_HEIGHT 6 /* this should probably be defined elsewhere; config-*.h perhaps? */
1453 int sby = i*h + offset + (h > 7 ? (h - 6) / 2 : 1); 1472 int sby = i*h + offset + (h > 7 ? (h - 6) / 2 : 1);
1454 gui_scrollbar_draw(display, 0, sby, display->width, 1473#define PROGRESS_BAR_HEIGHT gwps->data->progress_height /* this should probably be defined elsewhere; config-*.h perhaps? */
1474 if (!gwps->data->progress_end)
1475 gwps->data->progress_end=gwps->display->width;
1476 gui_scrollbar_draw(display, gwps->data->progress_start, sby,
1477 gwps->data->progress_end-gwps->data->progress_start,
1455 PROGRESS_BAR_HEIGHT, 1478 PROGRESS_BAR_HEIGHT,
1456 state->id3->length?state->id3->length:1, 0, 1479 state->id3->length?state->id3->length:1, 0,
1457 state->id3->length?state->id3->elapsed + state->ff_rewind_count:0, 1480 state->id3->length?state->id3->elapsed + state->ff_rewind_count:0,
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 8cd4c8f63e..7cb1cde7eb 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -309,6 +309,9 @@ struct wps_data
309 unsigned short time_mult[WPS_MAX_LINES][WPS_MAX_SUBLINES]; 309 unsigned short time_mult[WPS_MAX_LINES][WPS_MAX_SUBLINES];
310 long subline_expire_time[WPS_MAX_LINES]; 310 long subline_expire_time[WPS_MAX_LINES];
311 int curr_subline[WPS_MAX_LINES]; 311 int curr_subline[WPS_MAX_LINES];
312 int progress_height;
313 int progress_start;
314 int progress_end;
312 bool wps_loaded; 315 bool wps_loaded;
313 bool peak_meter_enabled; 316 bool peak_meter_enabled;
314}; 317};