-
- p_vout->pf_init = Init;
- p_vout->pf_end = End;
- p_vout->pf_manage = Manage;
- p_vout->pf_render = Render;
- p_vout->pf_display = Display;
-
- p_vout->p_sys->i_width = aa_imgwidth(p_vout->p_sys->aa_context);
- p_vout->p_sys->i_height = aa_imgheight(p_vout->p_sys->aa_context);
- aa_autoinitkbd( p_vout->p_sys->aa_context, 0 );
- aa_autoinitmouse( p_vout->p_sys->aa_context, AA_MOUSEPRESSMASK );
- aa_hidemouse( p_vout->p_sys->aa_context );
+ vout_display_DeleteWindow(vd, NULL);
+
+ aa_autoinitkbd(sys->aa_context, 0);
+ aa_autoinitmouse(sys->aa_context, AA_MOUSEALLMASK);
+
+ /* */
+ video_format_t fmt = vd->fmt;
+ fmt.i_chroma = VLC_CODEC_RGB8;
+ fmt.i_width = aa_imgwidth(sys->aa_context);
+ fmt.i_height = aa_imgheight(sys->aa_context);
+
+ /* */
+ vout_display_info_t info = vd->info;
+ info.has_pictures_invalid = true;
+
+ /* Setup vout_display now that everything is fine */
+ vd->fmt = fmt;
+ vd->info = info;
+
+ vd->pool = Pool;
+ vd->prepare = Prepare;
+ vd->display = PictureDisplay;
+ vd->control = Control;
+ vd->manage = Manage;
+
+ /* Inspect initial configuration and send correction events
+ * FIXME how to handle aspect ratio with aa ? */
+ sys->state = *vd->cfg;
+ sys->state.is_fullscreen = false;
+ vout_display_SendEventFullscreen(vd, false);
+ vout_display_SendEventDisplaySize(vd, fmt.i_width, fmt.i_height, false);