From 5840c85b88b5a27df2748ef49eb5d40db669cc3e Mon Sep 17 00:00:00 2001 From: arpi_esp Date: Sat, 23 Jun 2001 19:44:22 +0000 Subject: [PATCH] vo_subdevice support git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1211 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_mga.c | 5 +++-- 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) {