summaryrefslogtreecommitdiffstats
path: root/libmenu
diff options
context:
space:
mode:
Diffstat (limited to 'libmenu')
-rw-r--r--libmenu/menu.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libmenu/menu.c b/libmenu/menu.c
index 8f1f3f8bc9..3ac23ca1d8 100644
--- a/libmenu/menu.c
+++ b/libmenu/menu.c
@@ -300,7 +300,7 @@ static inline int get_height(int c,int h){
static void render_txt(char *txt)
{
while (*txt) {
- int c = utf8_get_char(&txt);
+ int c = utf8_get_char((const char**)&txt);
render_one_glyph(vo_font, c);
}
}
@@ -367,7 +367,7 @@ void menu_draw_text(mp_image_t* mpi,char* txt, int x, int y) {
render_txt(txt);
while (*txt) {
- int c=utf8_get_char(&txt);
+ int c=utf8_get_char((const char**)&txt);
if ((font=vo_font->font[c])>=0 && (x + vo_font->width[c] <= mpi->w) && (y + vo_font->pic_a[font]->h <= mpi->h))
draw_alpha(vo_font->width[c], vo_font->pic_a[font]->h,
vo_font->pic_b[font]->bmp+vo_font->start[c],
@@ -460,7 +460,7 @@ void menu_draw_text_full(mp_image_t* mpi,char* txt,
// Jump some the beginnig text if needed
while(sy < ymin && *txt) {
- int c=utf8_get_char(&txt);
+ int c=utf8_get_char((const char**)&txt);
if(c == '\n' || (warp && ll + vo_font->width[c] > w)) {
ll = 0;
sy += vo_font->height + vspace;
@@ -534,7 +534,7 @@ void menu_draw_text_full(mp_image_t* mpi,char* txt,
}
while(sx < xmax && txt != line_end) {
- int c=utf8_get_char(&txt);
+ int c=utf8_get_char((const char**)&txt);
font = vo_font->font[c];
if(font >= 0) {
int cs = (vo_font->pic_a[font]->h - vo_font->height) / 2;
@@ -562,7 +562,7 @@ int menu_text_length(char* txt) {
int l = 0;
render_txt(txt);
while (*txt) {
- int c=utf8_get_char(&txt);
+ int c=utf8_get_char((const char**)&txt);
l += vo_font->width[c]+vo_font->charspace;
}
return l - vo_font->charspace;
@@ -574,7 +574,7 @@ void menu_text_size(char* txt,int max_width, int vspace, int warp, int* _w, int*
render_txt(txt);
while (*txt) {
- int c=utf8_get_char(&txt);
+ int c=utf8_get_char((const char**)&txt);
if(c == '\n' || (warp && i + vo_font->width[c] >= max_width)) {
if(*txt)
l++;
@@ -594,7 +594,7 @@ int menu_text_num_lines(char* txt, int max_width) {
int l = 1, i = 0;
render_txt(txt);
while (*txt) {
- int c=utf8_get_char(&txt);
+ int c=utf8_get_char((const char**)&txt);
if(c == '\n' || i + vo_font->width[c] > max_width) {
l++;
i = 0;
@@ -609,7 +609,7 @@ char* menu_text_get_next_line(char* txt, int max_width) {
int i = 0;
render_txt(txt);
while (*txt) {
- int c=utf8_get_char(&txt);
+ int c=utf8_get_char((const char**)&txt);
if(c == '\n') {
txt++;
break;