diff options
-rw-r--r-- | libvo/vo_mga.c | 5 | ||||
-rw-r--r-- | libvo/vo_xmga.c | 14 |
2 files changed, 11 insertions, 8 deletions
diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c index a02d4d614c..8c92026890 100644 --- a/libvo/vo_mga.c +++ b/libvo/vo_mga.c @@ -56,11 +56,12 @@ static vo_info_t vo_info = static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) { +char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid"; - f = open("/dev/mga_vid",O_RDWR); + f = open(devname,O_RDWR); if(f == -1) { - printf("Couldn't open /dev/mga_vid\n"); + printf("Couldn't open %s\n",devname); return(-1); } diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index 2969917619..a640c0ea5f 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -191,12 +191,14 @@ static uint32_t init( uint32_t width, uint32_t height, uint32_t d_width, uint32_ XGCValues xgcv; unsigned long xswamask; - f=open( "/dev/mga_vid",O_RDWR ); - if ( f == -1 ) - { - printf("Couldn't open /dev/mga_vid\n"); - return(-1); - } + 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) { |