changeset 2693:1a8e5e017b1d

triple buffering interface
author nick
date Sun, 04 Nov 2001 18:06:31 +0000
parents b8e628b7a029
children 2924350d92ed
files linux/vbelib.c linux/vbelib.h
diffstat 2 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/linux/vbelib.c	Sun Nov 04 18:04:45 2001 +0000
+++ b/linux/vbelib.c	Sun Nov 04 18:06:31 2001 +0000
@@ -554,7 +554,7 @@
     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.ebx = vsync ? 0x82 : 2;
     r.ecx = pixel_num;
     r.edx = offset/(unsigned long)curr_mode_info.BytesPerScanLine;
     if(!VBE_LRMI_int(0x10,&r)) return VBE_VM86_FAIL;
@@ -566,6 +566,23 @@
   return retval;
 }
 
+int vbeSetScheduledDisplayStart(unsigned long offset, int vsync)
+{
+  int retval;
+  struct LRMI_regs r;
+  unsigned long pixel_num;
+  memset(&r,0,sizeof(struct LRMI_regs));
+  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 ? 0x82 : 2;
+  r.ecx = offset;
+  if(!VBE_LRMI_int(0x10,&r)) return VBE_VM86_FAIL;
+  retval = r.eax & 0xffff;
+  if(retval == 0x4f) retval = VBE_OK;
+  return retval;
+}
+
 struct realVesaProtModeInterface
 {
   unsigned short SetWindowCall;
--- a/linux/vbelib.h	Sun Nov 04 18:04:45 2001 +0000
+++ b/linux/vbelib.h	Sun Nov 04 18:06:31 2001 +0000
@@ -209,6 +209,7 @@
 extern int vbeSetScanLineLengthB(unsigned num_bytes);
 extern int vbeGetDisplayStart(unsigned *pixel_num,unsigned *scan_line);
 extern int vbeSetDisplayStart(unsigned long offset, int vsync);
+extern int vbeSetScheduledDisplayStart(unsigned long offset, int vsync);
 /*
    Func 0x08-0x09:
    Support of palette currently is not implemented.