# HG changeset patch # User arpi # Date 1017607531 0 # Node ID d596cf3c54aa9bb34e55b33611e528aae4090c22 # Parent 0c5025974a83f253987087a6c3efc0fa1032c4d2 open(/dev/mga_vid) moved to preinit diff -r 0c5025974a83 -r d596cf3c54aa libvo/mga_common.c --- a/libvo/mga_common.c Sun Mar 31 20:39:38 2002 +0000 +++ b/libvo/mga_common.c Sun Mar 31 20:45:31 2002 +0000 @@ -292,6 +292,15 @@ static uint32_t preinit(const char *arg) { + char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid"; + + f = open(devname,O_RDWR); + if(f == -1) + { + perror("open"); + printf("Couldn't open %s\n",devname); + return(-1); + } return 0; } diff -r 0c5025974a83 -r d596cf3c54aa libvo/vo_mga.c --- a/libvo/vo_mga.c Sun Mar 31 20:39:38 2002 +0000 +++ b/libvo/vo_mga.c Sun Mar 31 20:45:31 2002 +0000 @@ -60,9 +60,8 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format,const vo_tune_info_t *info) { -char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid"; - if (f >= 0) mga_uninit(); +// if (f >= 0) mga_uninit(); if(!vo_screenwidth || !vo_screenheight) { int fd; struct fb_var_screeninfo fbinfo; @@ -93,13 +92,6 @@ } - f = open(devname,O_RDWR); - if(f == -1) - { - printf("Couldn't open %s\n",devname); - return(-1); - } - switch(format){ case IMGFMT_YV12: width+=width&1;height+=height&1; diff -r 0c5025974a83 -r d596cf3c54aa libvo/vo_xmga.c --- a/libvo/vo_xmga.c Sun Mar 31 20:39:38 2002 +0000 +++ b/libvo/vo_xmga.c Sun Mar 31 20:45:31 2002 +0000 @@ -202,16 +202,6 @@ XGCValues xgcv; unsigned long xswamask; - char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid"; - - f = open(devname,O_RDWR); - if(f == -1) - { - perror("open"); - printf("Couldn't open %s\n",devname); - return(-1); - } - width+=width&1; switch(format)