mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 04:44:32 +01:00
Warning fixes:
menu.c:303: warning: passing argument 1 of 'utf8_get_char' from incompatible pointer type menu.c:370: warning: passing argument 1 of 'utf8_get_char' from incompatible pointer type menu.c:463: warning: passing argument 1 of 'utf8_get_char' from incompatible pointer type menu.c:537: warning: passing argument 1 of 'utf8_get_char' from incompatible pointer type menu.c:565: warning: passing argument 1 of 'utf8_get_char' from incompatible pointer type menu.c:577: warning: passing argument 1 of 'utf8_get_char' from incompatible pointer type menu.c:597: warning: passing argument 1 of 'utf8_get_char' from incompatible pointer type menu.c:612: warning: passing argument 1 of 'utf8_get_char' from incompatible pointer type git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24968 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
1479f405f6
commit
311e30c11a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user