annotate libmenu/menu_list.c @ 14874:3d383a0ea7fa

1.159: fix missing check against lame_init_params that was leading to video only files on low (under 32) audio bitrates 1.161: MEncoder multiple files patch by Oded Shimon (ods15) 1.162: Have OSS audio out fall back to s16ne instead of u8 if...
author kraymer
date Tue, 01 Mar 2005 17:43:01 +0000
parents ec8a1e6443d5
children 931bdbc37ee0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
1
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
2 #include <stdlib.h>
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
3 #include <stdio.h>
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
4 #include <ctype.h>
8623
440301fef3fe Added/reordered #includes to silence warnings about "implicit declaration".
rathann
parents: 8197
diff changeset
5 #include <string.h>
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
6
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
7 #include "../config.h"
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
8
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
9 #include "img_format.h"
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
10 #include "mp_image.h"
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
11
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
12 #include "m_struct.h"
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
13 #include "menu.h"
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
14
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
15 #include "../libvo/font_load.h"
9380
edfe34c5405d linux->osdep
arpi
parents: 8623
diff changeset
16 #include "../osdep/keycodes.h"
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
17
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
18 #define IMPL 1
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
19 #include "menu_list.h"
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
20
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
21 #define mpriv (menu->priv)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
22
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
23 void menu_list_draw(menu_t* menu,mp_image_t* mpi) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
24 int x = mpriv->x;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
25 int y = mpriv->y;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
26 int i;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
27 int h = mpriv->h;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
28 int w = mpriv->w;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
29 int dh = 0,dw = 0;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
30 int dy = 0;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
31 int need_h = 0,need_w = 0,ptr_l = menu_text_length(mpriv->ptr) + 10,sidx = 0;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
32 int th;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
33 list_entry_t* m;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
34
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
35 if(mpriv->count < 1)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
36 return;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
37
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
38 if(h <= 0) h = mpi->height;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
39 if(w <= 0) w = mpi->width;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
40 dh = h - 2*mpriv->minb;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
41 dw = w - 2*mpriv->minb;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
42 ptr_l = menu_text_length(mpriv->ptr);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
43 // mpi is too small
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
44 if(h - vo_font->height <= 0 || w - ptr_l <= 0 || dw <= 0 || dh <= 0)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
45 return;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
46
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
47 th = menu_text_num_lines(mpriv->title,dw) * (mpriv->vspace + vo_font->height) + mpriv->vspace;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
48
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
49 for(i = 0, m = mpriv->menu ; m ; m = m->next, i++) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
50 int ll = menu_text_length(m->txt);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
51 if(ptr_l + ll > need_w) need_w = ptr_l + ll;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
52 if(m == mpriv->current) sidx = i;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
53 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
54 if(need_w > dw) need_w = dw;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
55 if(x > 0)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
56 x += mpriv->minb;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
57 if(y > 0)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
58 y += mpriv->minb;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
59 else
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
60 y = mpriv->minb;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
61
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
62 need_h = mpriv->count * (mpriv->vspace + vo_font->height) - mpriv->vspace;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
63 if( need_h + th > dh) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
64 int start,end;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
65 int maxl = (dh + mpriv->vspace - th) / (mpriv->vspace + vo_font->height);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
66 if(maxl < 4) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
67 th = 0;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
68 maxl = (dh + mpriv->vspace) / ( vo_font->height + mpriv->vspace);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
69 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
70 // Too smoll
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
71 if(maxl < 1) return;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
72 need_h = maxl*(mpriv->vspace + vo_font->height) - mpriv->vspace;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
73
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
74 start = sidx - (maxl/2);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
75 if(start < 0) start = 0;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
76 end = start + maxl;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
77 if(end > mpriv->count) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
78 end = mpriv->count;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
79 if(end - start < maxl)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
80 start = end - maxl < 0 ? 0 : end - maxl;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
81 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
82 m = mpriv->menu;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
83 for(i = 0 ; m->next && i < start ; i++)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
84 m = m->next;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
85 } else
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
86 m = mpriv->menu;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
87
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
88 if(th > 0) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
89 menu_draw_text_full(mpi,mpriv->title,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
90 x < 0 ? mpi->w / 2 : x,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
91 dy+y,dw,0,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
92 mpriv->vspace,1,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
93 MENU_TEXT_TOP|MENU_TEXT_HCENTER,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
94 MENU_TEXT_TOP|(x < 0 ? MENU_TEXT_HCENTER :MENU_TEXT_LEFT));
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
95 dy += th;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
96 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
97
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
98 for( ; m != NULL && dy + vo_font->height < dh ; m = m->next ) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
99 if(m == mpriv->current)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
100 menu_draw_text_full(mpi,mpriv->ptr,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
101 x < 0 ? (mpi->w - need_w) / 2 + ptr_l : x,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
102 dy+y,dw,dh - dy,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
103 mpriv->vspace,0,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
104 MENU_TEXT_TOP|(x < 0 ? MENU_TEXT_RIGHT :MENU_TEXT_LEFT) ,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
105 MENU_TEXT_TOP|(x < 0 ? MENU_TEXT_RIGHT :MENU_TEXT_LEFT));
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
106 menu_draw_text_full(mpi,m->txt,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
107 x < 0 ? (mpi->w - need_w) / 2 + ptr_l : x + ptr_l,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
108 dy+y,dw-ptr_l,dh - dy,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
109 mpriv->vspace,0,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
110 MENU_TEXT_TOP|MENU_TEXT_LEFT,
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
111 MENU_TEXT_TOP|MENU_TEXT_LEFT);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
112 dy += vo_font->height + mpriv->vspace;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
113 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
114
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
115 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
116
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
117 void menu_list_read_cmd(menu_t* menu,int cmd) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
118 switch(cmd) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
119 case MENU_CMD_UP:
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
120 if(mpriv->current->prev) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
121 mpriv->current = mpriv->current->prev;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
122 } else {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
123 for( ; mpriv->current->next != NULL ; mpriv->current = mpriv->current->next)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
124 /* NOTHING */;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
125 } break;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
126 case MENU_CMD_DOWN:
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
127 if(mpriv->current->next) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
128 mpriv->current = mpriv->current->next;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
129 } else {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
130 mpriv->current = mpriv->menu;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
131 } break;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
132 case MENU_CMD_CANCEL:
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
133 menu->show = 0;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
134 menu->cl = 1;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
135 break;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
136 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
137 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
138
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
139 void menu_list_jump_to_key(menu_t* menu,int c) {
10935
ec8a1e6443d5 Fix long-known bug with handling 'down key' in lists.
lumag
parents: 9380
diff changeset
140 if(c < 256 && isalnum(c)) {
8197
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
141 list_entry_t* e = mpriv->current;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
142 if(e->txt[0] == c) e = e->next;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
143 for( ; e ; e = e->next) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
144 if(e->txt[0] == c) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
145 mpriv->current = e;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
146 return;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
147 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
148 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
149 for(e = mpriv->menu ; e ; e = e->next) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
150 if(e->txt[0] == c) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
151 mpriv->current = e;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
152 return;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
153 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
154 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
155 } else
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
156 menu_dflt_read_key(menu,c);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
157 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
158
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
159 void menu_list_read_key(menu_t* menu,int c,int jump_to) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
160 list_entry_t* m;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
161 int i;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
162 switch(c) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
163 case KEY_HOME:
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
164 mpriv->current = mpriv->menu;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
165 break;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
166 case KEY_END:
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
167 for(m = mpriv->current ; m && m->next ; m = m->next)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
168 /**/;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
169 if(m)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
170 mpriv->current = m;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
171 break;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
172 case KEY_PAGE_UP:
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
173 for(i = 0, m = mpriv->current ; m && m->prev && i < 10 ; m = m->prev, i++)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
174 /**/;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
175 if(m)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
176 mpriv->current = m;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
177 break;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
178 case KEY_PAGE_DOWN:
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
179 for(i = 0, m = mpriv->current ; m && m->next && i < 10 ; m = m->next, i++)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
180 /**/;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
181 if(m)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
182 mpriv->current = m;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
183 break;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
184 default:
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
185 if(jump_to)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
186 menu_list_jump_to_key(menu,c);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
187 else
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
188 menu_dflt_read_key(menu,c);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
189 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
190 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
191
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
192 void menu_list_add_entry(menu_t* menu,list_entry_t* entry) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
193 list_entry_t* l;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
194 mpriv->count++;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
195
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
196 if(mpriv->menu == NULL) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
197 mpriv->menu = mpriv->current = entry;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
198 return;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
199 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
200
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
201 for(l = mpriv->menu ; l->next != NULL ; l = l->next)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
202 /* NOP */;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
203 l->next = entry;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
204 entry->prev = l;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
205 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
206
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
207 void menu_list_init(menu_t* menu) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
208 if(!mpriv)
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
209 mpriv = calloc(1,sizeof(struct menu_priv_s));
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
210
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
211 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
212
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
213 void menu_list_uninit(menu_t* menu,free_entry_t free_func) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
214 list_entry_t *i,*j;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
215
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
216 if(!free_func) free_func = (free_entry_t)free;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
217
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
218 for(i = mpriv->menu ; i != NULL ; ) {
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
219 j = i->next;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
220 free_func(i);
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
221 i = j;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
222 }
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
223
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
224 mpriv->menu = mpriv->current = NULL;
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
225
b31caec933e9 OSD menus initial version
albeu
parents:
diff changeset
226 }