diff libvo/vesa_lvo.c @ 3266:ff90589b635f

Fixed single buffering problems and -vo mga compatibility by number of buffers
author nick
date Sun, 02 Dec 2001 12:21:13 +0000
parents 1d2b2885bb8c
children 9b6430df4de5
line wrap: on
line diff
--- a/libvo/vesa_lvo.c	Sun Dec 02 11:45:44 2001 +0000
+++ b/libvo/vesa_lvo.c	Sun Dec 02 12:21:13 2001 +0000
@@ -29,7 +29,7 @@
 #include "video_out.h"
 
 #define WIDTH_ALIGN 32 /* should be 16 for rage:422 and 32 for rage:420 */
-#define NUM_FRAMES 2
+#define NUM_FRAMES 10
 #define UNUSED(x) ((void)(x)) /**< Removes warning about unused arguments */
 
 static uint8_t *frames[NUM_FRAMES];
@@ -211,9 +211,12 @@
 void     vlvo_flip_page(void)
 {
   if(verbose > 1) printf("vesa_lvo: vlvo_flip_page() was called\n");
+  if(vo_doublebuffering)
+  {
 	ioctl(lvo_handler,MGA_VID_FSEL,&next_frame);
 	next_frame=(next_frame+1)%mga_vid_config.num_frames;
 	lvo_mem=frames[next_frame];
+  }	
 }
 
 static void draw_alpha_null(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)