1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-31 15:59:34 +00:00

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
This commit is contained in:
arpi 2003-01-20 21:33:11 +00:00
parent 9b14c6f5ac
commit 7750844519

View File

@ -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;