2024-04-11 22:53:15 +08:00
|
|
|
#include "../include/graphics.h"
|
2024-05-02 11:06:52 +08:00
|
|
|
#include "../include/io.h"
|
2024-04-11 22:53:15 +08:00
|
|
|
|
2024-05-03 20:32:10 +08:00
|
|
|
int isVBEDisplayMode(uint16_t vbe_mode_info) {
|
|
|
|
if (vbe_mode_info & (1 << 12)) {
|
|
|
|
return 1;
|
|
|
|
} else {
|
|
|
|
return 0;
|
|
|
|
}
|
2024-04-12 22:03:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void initVBE(multiboot_t *mboot) {
|
2024-04-11 22:53:15 +08:00
|
|
|
|
2024-05-03 20:32:10 +08:00
|
|
|
if(isVBEDisplayMode(mboot->vbe_mode_info)){
|
|
|
|
printf("[\035kernel\036]: Graphics mode: \037VBE\036\n");
|
|
|
|
} else printf("[\035kernel\036]: Graphics mode: \037VGA\036\n");
|
2024-04-11 22:53:15 +08:00
|
|
|
}
|