Mercurial > mplayer.hg
comparison libmenu/vf_menu.c @ 8224:fefc56153615
Fix freetype. Freetype is highly recommended for a nice output ;)
author | albeu |
---|---|
date | Mon, 18 Nov 2002 00:09:37 +0000 |
parents | b31caec933e9 |
children | 64352fb332b6 |
comparison
equal
deleted
inserted
replaced
8223:a88e53ef3029 | 8224:fefc56153615 |
---|---|
12 #include "../libmpcodecs/mp_image.h" | 12 #include "../libmpcodecs/mp_image.h" |
13 #include "../libmpcodecs/vf.h" | 13 #include "../libmpcodecs/vf.h" |
14 | 14 |
15 #include "../libvo/fastmemcpy.h" | 15 #include "../libvo/fastmemcpy.h" |
16 #include "../libvo/video_out.h" | 16 #include "../libvo/video_out.h" |
17 #include "../libvo/font_load.h" | |
17 #include "../input/input.h" | 18 #include "../input/input.h" |
18 #include "../m_struct.h" | 19 #include "../m_struct.h" |
19 #include "menu.h" | 20 #include "menu.h" |
20 | 21 |
21 extern vo_functions_t* video_out; | 22 extern vo_functions_t* video_out; |
215 free_mp_image(pause_mpi); | 216 free_mp_image(pause_mpi); |
216 pause_mpi = NULL; | 217 pause_mpi = NULL; |
217 } | 218 } |
218 } | 219 } |
219 | 220 |
221 static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height, | |
222 unsigned int flags, unsigned int outfmt) { | |
223 #ifdef HAVE_FREETYPE | |
224 // here is the right place to get screen dimensions | |
225 if (force_load_font) { | |
226 force_load_font = 0; | |
227 load_font(width,height); | |
228 } | |
229 #endif | |
230 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); | |
231 } | |
220 static int open(vf_instance_t *vf, char* args){ | 232 static int open(vf_instance_t *vf, char* args){ |
221 if(!st_priv) { | 233 if(!st_priv) { |
222 st_priv = calloc(1,sizeof(struct vf_priv_s)); | 234 st_priv = calloc(1,sizeof(struct vf_priv_s)); |
223 st_priv->root = st_priv->current = menu_open(args); | 235 st_priv->root = st_priv->current = menu_open(args); |
224 if(!st_priv->current) { | 236 if(!st_priv->current) { |
227 return 0; | 239 return 0; |
228 } | 240 } |
229 mp_input_add_cmd_filter((mp_input_cmd_filter)cmd_filter,st_priv); | 241 mp_input_add_cmd_filter((mp_input_cmd_filter)cmd_filter,st_priv); |
230 } | 242 } |
231 | 243 |
244 vf->config = config; | |
232 vf->put_image = put_image; | 245 vf->put_image = put_image; |
233 vf->get_image = get_image; | 246 vf->get_image = get_image; |
234 vf->uninit=uninit; | 247 vf->uninit=uninit; |
235 vf->priv=st_priv; | 248 vf->priv=st_priv; |
236 go2pause=0; | 249 go2pause=0; |