summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-20 21:33:11 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-20 21:33:11 +0000
commit7750844519bb62146e52bbc802b1fe076397cf9d (patch)
tree70ed1d10eed3a0fb0c54604b1a8308a1cd4a29e6 /libvo
parent9b14c6f5acb802682cb7a2981668bef91e3ca61e (diff)
downloadmpv-7750844519bb62146e52bbc802b1fe076397cf9d.tar.bz2
mpv-7750844519bb62146e52bbc802b1fe076397cf9d.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_svga.c10
1 files changed, 6 insertions, 4 deletions
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;