summaryrefslogtreecommitdiffstats
path: root/linux/vbelib.c
diff options
context:
space:
mode:
authornick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-04 16:20:58 +0000
committernick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-04 16:20:58 +0000
commit11148f08356f41572684d19355593d5dee4b4b88 (patch)
tree7d6f550db54ccdf6d7dd75c4db016a3feb07299b /linux/vbelib.c
parent6dfef680084cd0b09ab85d8c4ff4d8685eea8255 (diff)
downloadmpv-11148f08356f41572684d19355593d5dee4b4b88.tar.bz2
mpv-11148f08356f41572684d19355593d5dee4b4b88.tar.xz
Double buffering support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2687 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'linux/vbelib.c')
-rw-r--r--linux/vbelib.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/linux/vbelib.c b/linux/vbelib.c
index 678a3062a7..9f177cd111 100644
--- a/linux/vbelib.c
+++ b/linux/vbelib.c
@@ -539,25 +539,29 @@ int vbeSetDisplayStart(unsigned long offset, int vsync)
"pushl %%ebx\n"
"movl %1, %%ebx\n"
::"a"(0x4f07),"S"(vsync ? 0x80 : 0),
- "c"(offset & 0xffff),"d"((offset>>16)&0xffff):"memory");
+ "c"((offset>>2) & 0xffff),"d"((offset>>18)&0xffff):"memory");
(*vbe_pm_info.SetDisplayStart)();
__asm __volatile("popl %%ebx":::"memory");
retval = VBE_OK;
}
else
{
+#if 0
+ /* Something wrong here */
struct LRMI_regs r;
unsigned long pixel_num;
memset(&r,0,sizeof(struct LRMI_regs));
- r.eax = 0x4f07;
- r.ebx = vsync ? 0x80 : 0;
pixel_num = offset%(unsigned long)curr_mode_info.BytesPerScanLine;
if(pixel_num*(unsigned long)curr_mode_info.BytesPerScanLine!=offset) pixel_num++;
+ r.eax = 0x4f07;
+ r.ebx = vsync ? 0x80 : 0;
r.ecx = pixel_num;
r.edx = offset/(unsigned long)curr_mode_info.BytesPerScanLine;
if(!VBE_LRMI_int(0x10,&r)) return VBE_VM86_FAIL;
retval = r.eax & 0xffff;
if(retval == 0x4f) retval = VBE_OK;
+#endif
+ retval = VBE_BROKEN_BIOS;
}
return retval;
}