# HG changeset patch # User rfelker # Date 1017378205 0 # Node ID 7296c426245756bc4c6c0ec535ad72436c324e8e # Parent 3af2729c5c87cc66f75cb7a9a3da44033dc31656 quick hack to make vo_mga accept multiple calls to config someone else should probably improve on this later diff -r 3af2729c5c87 -r 7296c4262457 libvo/mga_common.c --- a/libvo/mga_common.c Fri Mar 29 03:17:57 2002 +0000 +++ b/libvo/mga_common.c Fri Mar 29 05:03:25 2002 +0000 @@ -9,7 +9,7 @@ static mga_vid_config_t mga_vid_config; static uint8_t *vid_data, *frames[4]; -static int f; +static int f = -1; static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){ int x,y; @@ -334,6 +334,7 @@ ioctl( f,MGA_VID_OFF,0 ); munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames); close(f); + f = -1; } static uint32_t preinit(const char *arg) diff -r 3af2729c5c87 -r 7296c4262457 libvo/vo_mga.c --- a/libvo/vo_mga.c Fri Mar 29 03:17:57 2002 +0000 +++ b/libvo/vo_mga.c Fri Mar 29 05:03:25 2002 +0000 @@ -62,6 +62,7 @@ { char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid"; + if (f >= 0) mga_uninit(); if(!vo_screenwidth || !vo_screenheight) { int fd; struct fb_var_screeninfo fbinfo;