Mercurial > mplayer.hg
comparison gui/ui/render.c @ 37011:322951bebfd6
Rename parameter.
It isn't the number of items but the last index in use.
Rewrite the condition in order ro reflect this.
author | ib |
---|---|
date | Sat, 29 Mar 2014 13:49:26 +0000 |
parents | af84671a576f |
children | 79c50282f8ab |
comparison
equal
deleted
inserted
replaced
37010:af84671a576f | 37011:322951bebfd6 |
---|---|
394 | 394 |
395 yc += drawbuf_width; | 395 yc += drawbuf_width; |
396 } | 396 } |
397 } | 397 } |
398 | 398 |
399 void RenderAll(wsWindow *window, guiItem *items, int nrItems, char *drawbuf) | 399 void RenderAll(wsWindow *window, guiItem *items, int till, char *drawbuf) |
400 { | 400 { |
401 uint32_t *db; | 401 uint32_t *db; |
402 guiItem *item; | 402 guiItem *item; |
403 guiImage *image = NULL; | 403 guiImage *image = NULL; |
404 int dw, i, index; | 404 int dw, i, index; |
405 | 405 |
406 db = (uint32_t *)drawbuf; | 406 db = (uint32_t *)drawbuf; |
407 dw = window->Width; | 407 dw = window->Width; |
408 | 408 |
409 for (i = 0; i < nrItems + 1; i++) { | 409 for (i = 0; i <= till; i++) { |
410 item = &items[i]; | 410 item = &items[i]; |
411 | 411 |
412 switch (item->pressed) { | 412 switch (item->pressed) { |
413 case btnPressed: | 413 case btnPressed: |
414 index = 0; | 414 index = 0; |