summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index afc00a4519..665f6f4bb0 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -1130,7 +1130,7 @@ void gui_wps_format(struct wps_data *data, const char *bmpdir,
1130 1130
1131 /* load the image */ 1131 /* load the image */
1132 ret = read_bmp_file(imgname, &data->img[n].w, 1132 ret = read_bmp_file(imgname, &data->img[n].w,
1133 &data->img[n].h, img_buf_ptr, 1133 &data->img[n].h, (char *)img_buf_ptr,
1134 img_buf_free); 1134 img_buf_free);
1135 if (ret > 0) 1135 if (ret > 0)
1136 { 1136 {
@@ -1389,10 +1389,11 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
1389#endif 1389#endif
1390#ifdef HAVE_LCD_BITMAP 1390#ifdef HAVE_LCD_BITMAP
1391 /* calculate different string sizes and positions */ 1391 /* calculate different string sizes and positions */
1392 display->getstringsize(" ", &space_width, &string_height); 1392 display->getstringsize((unsigned char *)" ", &space_width, &string_height);
1393 if (data->format_align[i][data->curr_subline[i]].left != 0) { 1393 if (data->format_align[i][data->curr_subline[i]].left != 0) {
1394 display->getstringsize(data->format_align[i][data->curr_subline[i]].left, 1394 display->getstringsize((unsigned char *)data->format_align[i]
1395 &left_width, &string_height); 1395 [data->curr_subline[i]].left,
1396 &left_width, &string_height);
1396 } 1397 }
1397 else { 1398 else {
1398 left_width = 0; 1399 left_width = 0;
@@ -1400,8 +1401,9 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
1400 left_xpos = 0; 1401 left_xpos = 0;
1401 1402
1402 if (data->format_align[i][data->curr_subline[i]].center != 0) { 1403 if (data->format_align[i][data->curr_subline[i]].center != 0) {
1403 display->getstringsize(data->format_align[i][data->curr_subline[i]].center, 1404 display->getstringsize((unsigned char *)data->format_align[i]
1404 &center_width, &string_height); 1405 [data->curr_subline[i]].center,
1406 &center_width, &string_height);
1405 } 1407 }
1406 else { 1408 else {
1407 center_width = 0; 1409 center_width = 0;
@@ -1409,8 +1411,9 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
1409 center_xpos=(display->width - center_width) / 2; 1411 center_xpos=(display->width - center_width) / 2;
1410 1412
1411 if (data->format_align[i][data->curr_subline[i]].right != 0) { 1413 if (data->format_align[i][data->curr_subline[i]].right != 0) {
1412 display->getstringsize(data->format_align[i][data->curr_subline[i]].right, 1414 display->getstringsize((unsigned char *)data->format_align[i]
1413 &right_width, &string_height); 1415 [data->curr_subline[i]].right,
1416 &right_width, &string_height);
1414 } 1417 }
1415 else { 1418 else {
1416 right_width = 0; 1419 right_width = 0;
@@ -1517,7 +1520,8 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
1517 1520
1518 if (left_width>display->width) { 1521 if (left_width>display->width) {
1519 display->puts_scroll(0, i, 1522 display->puts_scroll(0, i,
1520 data->format_align[i][data->curr_subline[i]].left); 1523 (unsigned char *)data->format_align[i]
1524 [data->curr_subline[i]].left);
1521 } else { 1525 } else {
1522 /* clear the line first */ 1526 /* clear the line first */
1523 display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 1527 display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
@@ -1526,23 +1530,26 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
1526 1530
1527 /* Nasty hack: we output an empty scrolling string, 1531 /* Nasty hack: we output an empty scrolling string,
1528 which will reset the scroller for that line */ 1532 which will reset the scroller for that line */
1529 display->puts_scroll(0, i, ""); 1533 display->puts_scroll(0, i, (unsigned char *)"");
1530 1534
1531 /* print aligned strings */ 1535 /* print aligned strings */
1532 if (left_width != 0) 1536 if (left_width != 0)
1533 { 1537 {
1534 display->putsxy(left_xpos, ypos, 1538 display->putsxy(left_xpos, ypos,
1535 data->format_align[i][data->curr_subline[i]].left); 1539 (unsigned char *)data->format_align[i]
1540 [data->curr_subline[i]].left);
1536 } 1541 }
1537 if (center_width != 0) 1542 if (center_width != 0)
1538 { 1543 {
1539 display->putsxy(center_xpos, ypos, 1544 display->putsxy(center_xpos, ypos,
1540 data->format_align[i][data->curr_subline[i]].center); 1545 (unsigned char *)data->format_align[i]
1546 [data->curr_subline[i]].center);
1541 } 1547 }
1542 if (right_width != 0) 1548 if (right_width != 0)
1543 { 1549 {
1544 display->putsxy(right_xpos, ypos, 1550 display->putsxy(right_xpos, ypos,
1545 data->format_align[i][data->curr_subline[i]].right); 1551 (unsigned char *)data->format_align[i]
1552 [data->curr_subline[i]].right);
1546 } 1553 }
1547 } 1554 }
1548#else 1555#else
@@ -1568,23 +1575,26 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
1568 1575
1569 /* Nasty hack: we output an empty scrolling string, 1576 /* Nasty hack: we output an empty scrolling string,
1570 which will reset the scroller for that line */ 1577 which will reset the scroller for that line */
1571 display->puts_scroll(0, i, ""); 1578 display->puts_scroll(0, i, (unsigned char *)"");
1572 1579
1573 /* print aligned strings */ 1580 /* print aligned strings */
1574 if (left_width != 0) 1581 if (left_width != 0)
1575 { 1582 {
1576 display->putsxy(left_xpos, ypos, 1583 display->putsxy(left_xpos, ypos,
1577 data->format_align[i][data->curr_subline[i]].left); 1584 (unsigned char *)data->format_align[i]
1585 [data->curr_subline[i]].left);
1578 } 1586 }
1579 if (center_width != 0) 1587 if (center_width != 0)
1580 { 1588 {
1581 display->putsxy(center_xpos, ypos, 1589 display->putsxy(center_xpos, ypos,
1582 data->format_align[i][data->curr_subline[i]].center); 1590 (unsigned char *)data->format_align[i]
1591 [data->curr_subline[i]].center);
1583 } 1592 }
1584 if (right_width != 0) 1593 if (right_width != 0)
1585 { 1594 {
1586 display->putsxy(right_xpos, ypos, 1595 display->putsxy(right_xpos, ypos,
1587 data->format_align[i][data->curr_subline[i]].right); 1596 (unsigned char *)data->format_align[i]
1597 [data->curr_subline[i]].right);
1588 } 1598 }
1589#else 1599#else
1590 update_line = true; 1600 update_line = true;