changeset 11129:9a941857969a

I found that the tdfxfb video output driver doesn't work when compiled with gcc 3.x. The OSD works fine, but the video size is not adjusted properly (it is always the same size as a console character). This patch corrects it (at least it works on my system). Tested with gcc 3.3.1 and gcc 2.95.4. patch by Jes«ās S«”nchez <gusanje@yahoo.es>
author attila
date Wed, 15 Oct 2003 16:50:27 +0000
parents db9ced943496
children c90317724a1d
files libvo/vo_tdfxfb.c
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_tdfxfb.c	Wed Oct 15 16:46:55 2003 +0000
+++ b/libvo/vo_tdfxfb.c	Wed Oct 15 16:50:27 2003 +0000
@@ -76,7 +76,7 @@
 	vid_voodoo_format, *vidpage, *hidpage, *inpage, vidpageoffset,
 	hidpageoffset, inpageoffset, *memBase0 = NULL, *memBase1 = NULL, r_width, r_height;
 static volatile voodoo_io_reg *reg_IO;
-static voodoo_2d_reg *reg_2d;
+static volatile voodoo_2d_reg *reg_2d;
 static voodoo_yuv_reg *reg_YUV;
 static struct YUV_plane *YUV;
 static void (*alpha_func)(), (*alpha_func_double)();
@@ -349,10 +349,6 @@
 {
 	voodoo_2d_reg regs = *reg_2d;		/* Copy the regs */
 	int i = 0;
-	/* This has to be done of else setting dstSize doesn't work  */
-	/* Must be a gcc 3.0+ bug */
-	int tempvidheight = vidheight; 
-	int tempvidwidth = vidwidth;
 
 	if(vo_doublebuffering) {
 		/* Flip to an offscreen buffer for rendering */
@@ -377,7 +373,6 @@
 	reg_2d->dstBaseAddr = vidpageoffset;
 	reg_2d->dstXY = XYREG(vidx, vidy);
 	reg_2d->dstFormat = vid_voodoo_format;
-	/* The XYREG macro doesn't seem to work for this line so build the register contents very explicitly */
 	reg_2d->dstSize = XYREG(vidwidth, vidheight);
 	reg_2d->command = S2S_STRECH_BLT | S2S_IMMED | S2S_ROP;