Using framebuffer info for putpixel loop instead of hardcoded values
(never expect Multiboot to give you what you want!)
This commit is contained in:
parent
b2c4091216
commit
5badddbada
1 changed files with 2 additions and 2 deletions
|
@ -71,8 +71,8 @@ void kmain (unsigned int mbootmagick, multiboot_info_t* mbootinfo) {
|
||||||
int x, y, i;
|
int x, y, i;
|
||||||
unsigned char c = 0;
|
unsigned char c = 0;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
for(y=0;y<768;y++) {
|
for(y=0; y < mbootinfo->framebuffer_height; y++) {
|
||||||
for(x=0;x<1024;x++) {
|
for(x=0; x < mbootinfo->framebuffer_width; x++) {
|
||||||
putpixel(x, y, c, c, c, 0xff);
|
putpixel(x, y, c, c, c, 0xff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue