From 7750844519bb62146e52bbc802b1fe076397cf9d Mon Sep 17 00:00:00 2001 From: arpi Date: Mon, 20 Jan 2003 21:33:11 +0000 Subject: This patch should fix the display problem with 4bpp and 8bpp modes. The problem was that the new drawing method assumes a linear framebuffer, which is not available in those modes. This can be worked around by using the old drawing method, which is what this patch does. The old method can be forced, by using the "old" driver option. This patch also enables linear addressing, since it improves write speed to video memory considerably. The mentioned problem: "it is not compatable with vga_draw* for some cards" Is a bug in svgalib, which I think should be fixed in recent svgalib versions. If someone sees this problem, please report to svgalib maintainer (that's me). patch by Matan Ziv-Av. matan@svgalib.org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9047 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_svga.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libvo/vo_svga.c') diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c index 0429cacd77..dab8607d10 100644 --- a/libvo/vo_svga.c +++ b/libvo/vo_svga.c @@ -457,6 +457,9 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, return(1); // error } + if(vid_mode<10 || vid_mode==145) { + oldmethod=1; + } /* set 332 palette for 8 bpp */ if(bpp==8){ int i; @@ -473,12 +476,11 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, WIDTH=vga_getxdim(); HEIGHT=vga_getydim(); BYTESPERPIXEL=(bpp+4)>>3; - if(bpp==1) - LINEWIDTH=(WIDTH+7)/8; - else LINEWIDTH=vga_getmodeinfo(vid_mode)->linewidth; -// vga_setlinearaddressing(); //it is not compatable with vga_draw* for "some" cards + if(oldmethod && (bpp==8 || bpp==4)) LINEWIDTH*=8; + + if(!oldmethod || (bpp>8))vga_setlinearaddressing(); if(oldmethod) { buffer=malloc(HEIGHT*LINEWIDTH); maxframes=0; -- cgit v1.2.3