changeset 1210:5cbbca64a5c9

vo_subdevice support
author arpi_esp
date Sat, 23 Jun 2001 19:44:22 +0000
parents 18539f68dd37
children e21c61b2313e
files libvo/vo_mga.c libvo/vo_xmga.c
diffstat 2 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_mga.c	Sat Jun 23 19:40:04 2001 +0000
+++ b/libvo/vo_mga.c	Sat Jun 23 19:44:22 2001 +0000
@@ -56,11 +56,12 @@
 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);
 	}
 
--- a/libvo/vo_xmga.c	Sat Jun 23 19:40:04 2001 +0000
+++ b/libvo/vo_xmga.c	Sat Jun 23 19:44:22 2001 +0000
@@ -191,12 +191,14 @@
  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)
   {