vgabios: Unify X_set_mode() functions.
[seabios.git] / vgasrc / vgahw.h
1 #ifndef __VGAHW_H
2 #define __VGAHW_H
3
4 #include "types.h" // u8
5 #include "config.h" // CONFIG_*
6
7 #include "clext.h" // clext_set_mode
8 #include "bochsvga.h" // bochsvga_set_mode
9 #include "stdvga.h" // stdvga_set_mode
10
11 static inline int vgahw_set_mode(int mode, int flags) {
12     if (CONFIG_VGA_CIRRUS)
13         return clext_set_mode(mode, flags);
14     if (CONFIG_VGA_BOCHS)
15         return bochsvga_set_mode(mode, flags);
16     return stdvga_set_mode(mode, flags);
17 }
18
19 #endif // vgahw.h