mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
open(/dev/mga_vid) moved to preinit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5434 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
ceda41612a
commit
cc0437f18c
@ -292,6 +292,15 @@ static int mga_uninit(){
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -60,9 +60,8 @@ static vo_info_t vo_info =
|
||||
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 @@ char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid";
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
@ -202,16 +202,6 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user