[Mplayer-cvslog] CVS: main/vidix/drivers mga_vid.c,1.22,1.23

Alex Beregszaszi alex at mplayerhq.hu
Wed Oct 22 15:47:57 CEST 2003


Update of /cvsroot/mplayer/main/vidix/drivers
In directory mail:/var/tmp.root/cvs-serv29691

Modified Files:
	mga_vid.c 
Log Message:
-nocolorkey support

Index: mga_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/mga_vid.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- mga_vid.c	2 Oct 2003 15:40:15 -0000	1.22
+++ mga_vid.c	22 Oct 2003 13:47:27 -0000	1.23
@@ -380,8 +380,8 @@
 	    // restore it
 	    colkey_saved=0;
 
-		printf("[mga] Restoring colorkey (ON: %d  %02X:%02X:%02X)\n",
-			colkey_on,colkey_color[0],colkey_color[1],colkey_color[2]);
+//		printf("[mga] Restoring colorkey (ON: %d  %02X:%02X:%02X)\n",
+//			colkey_on,colkey_color[0],colkey_color[1],colkey_color[2]);
 
 		// Set color key registers:
 		writeb( XKEYOPMODE, mga_mmio_base + PALWTADD);
@@ -430,8 +430,8 @@
 		writeb( XCOLMSK, mga_mmio_base + PALWTADD);
 		colkey_mask[3]=(unsigned char)readb(mga_mmio_base + X_DATAREG);
 
-		printf("[mga] Saved colorkey (ON: %d  %02X:%02X:%02X)\n",
-			colkey_on,colkey_color[0],colkey_color[1],colkey_color[2]);
+//		printf("[mga] Saved colorkey (ON: %d  %02X:%02X:%02X)\n",
+//			colkey_on,colkey_color[0],colkey_color[1],colkey_color[2]);
 
 	}
 	
@@ -471,6 +471,10 @@
 			break;
 		}
 
+		// Enable colorkeying
+		writeb( XKEYOPMODE, mga_mmio_base + PALWTADD);
+		writeb( 1, mga_mmio_base + X_DATAREG);
+
 		// Disable color keying on alpha channel 
 		writeb( XCOLMSK, mga_mmio_base + PALWTADD);
 		writeb( 0x00, mga_mmio_base + X_DATAREG);
@@ -494,7 +498,12 @@
 		writeb( XCOLMSK0BLUE, mga_mmio_base + PALWTADD);
 		writeb( 0xff, mga_mmio_base + X_DATAREG);
 	}
-
+	else
+	{
+		// Disable colorkeying
+		writeb( XKEYOPMODE, mga_mmio_base + PALWTADD);
+		writeb( 0, mga_mmio_base + X_DATAREG);
+	}
 }
 
 	// Backend Scaler



More information about the MPlayer-cvslog mailing list