correct window size in banked vbe, and added doublebuffered test
[vidsys] / vidsys.c
index 01c8c81..3a88f9c 100644 (file)
--- a/vidsys.c
+++ b/vidsys.c
@@ -175,9 +175,14 @@ struct vid_modeinfo *vid_modeinfo(int mode)
        return 0;
 }
 
-void vid_vsync(void)
+int vid_islinear(void)
 {
-       vga_vsync();
+       return !vid_isbanked();
+}
+
+int vid_isbanked(void)
+{
+       return cur_mode->win_size && vid_vmem < (void*)0x100000;
 }
 
 void vid_setpal(int idx, int count, const struct vid_color *col)
@@ -189,3 +194,11 @@ void vid_getpal(int idx, int count, struct vid_color *col)
 {
        cur_mode->ops.getpal(idx, count, col);
 }
+
+void vid_blitfb(void *fb, int pitch)
+{
+       if(pitch <= 0) {
+               pitch = cur_mode->pitch;
+       }
+       cur_mode->ops.blitfb(fb, pitch);
+}