Mercurial > mplayer.hg
changeset 5433:d596cf3c54aa
open(/dev/mga_vid) moved to preinit
author | arpi |
---|---|
date | Sun, 31 Mar 2002 20:45:31 +0000 |
parents | 0c5025974a83 |
children | dc5b373cc604 |
files | libvo/mga_common.c libvo/vo_mga.c libvo/vo_xmga.c |
diffstat | 3 files changed, 10 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- 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; }
--- 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;
--- 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)