changeset 5432:0c5025974a83

use only 1 buffers if dr=yes and double=no
author arpi
date Sun, 31 Mar 2002 20:39:38 +0000
parents 013458752947
children d596cf3c54aa
files libvo/mga_common.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/mga_common.c	Sun Mar 31 20:38:56 2002 +0000
+++ b/libvo/mga_common.c	Sun Mar 31 20:39:38 2002 +0000
@@ -257,7 +257,7 @@
 static int mga_init(){
 	char *frame_mem;
 
-	mga_vid_config.num_frames=4;
+	mga_vid_config.num_frames=(vo_directrendering && !vo_doublebuffering)?1:3;
 	mga_vid_config.version=MGA_VID_VERSION;
 	if (ioctl(f,MGA_VID_CONFIG,&mga_vid_config))
 	{
@@ -266,6 +266,8 @@
 		return -1;
 	}
 	ioctl(f,MGA_VID_ON,0);
+	
+	printf("[mga] Using %d buffers.\n",mga_vid_config.num_frames);
 
 	frames[0] = (char*)mmap(0,mga_vid_config.frame_size*mga_vid_config.num_frames,PROT_WRITE,MAP_SHARED,f,0);
 	frames[1] = frames[0] + 1*mga_vid_config.frame_size;