Using framebuffer info for putpixel loop instead of hardcoded values

(never expect Multiboot to give you what you want!)
This commit is contained in:
Jarkko Toivanen 2023-06-23 22:54:46 +03:00
parent b2c4091216
commit 5badddbada
Signed by: jt
GPG key ID: 9151B109B73ECAD5

View file

@ -71,8 +71,8 @@ void kmain (unsigned int mbootmagick, multiboot_info_t* mbootinfo) {
int x, y, i;
unsigned char c = 0;
for(;;) {
for(y=0;y<768;y++) {
for(x=0;x<1024;x++) {
for(y=0; y < mbootinfo->framebuffer_height; y++) {
for(x=0; x < mbootinfo->framebuffer_width; x++) {
putpixel(x, y, c, c, c, 0xff);
}
}