vgabios: Add support for vesa get/set window function.
[seabios.git] / vgasrc / vgahw.h
index bb5112a691d23def31ea523f17eeb3ac9834dada..ca8798cb8ec1b8a991ea52c63f928f5715659349 100644 (file)
@@ -44,4 +44,21 @@ static inline int vgahw_init(void) {
     return stdvga_init();
 }
 
+static inline int vgahw_get_window(struct vgamode_s *vmode_g, int window) {
+    if (CONFIG_VGA_CIRRUS)
+        return clext_get_window(vmode_g, window);
+    if (CONFIG_VGA_BOCHS)
+        return bochsvga_get_window(vmode_g, window);
+    return stdvga_get_window(vmode_g, window);
+}
+
+static inline int vgahw_set_window(struct vgamode_s *vmode_g, int window
+                                   , int val) {
+    if (CONFIG_VGA_CIRRUS)
+        return clext_set_window(vmode_g, window, val);
+    if (CONFIG_VGA_BOCHS)
+        return bochsvga_set_window(vmode_g, window, val);
+    return stdvga_set_window(vmode_g, window, val);
+}
+
 #endif // vgahw.h