forked from PoliEcho-holding-org/kern
[ BIG CHANGE ] Properly Implemented IDT
- New include files: idt.h, pic.h, syscall.h and exceptions.h - Proper exception handling (still could be improved - PIC properly initiated and irqs all masked - BREAKS Keyboard - The keyboard IRQ is not handled anymore - convertColor() is kinda broken :/ (More in README.md)
This commit is contained in:
+5
-3
@@ -93,9 +93,11 @@ uint32_t convertColor(uint32_t color) {
|
||||
return color & 0xff;
|
||||
}
|
||||
|
||||
uint8_t red = ((color >> 16) & 0xff) * (((1 << gfxMode->linearRedMaskSize) - 1) / 255.0);
|
||||
uint8_t green = ((color >> 8 ) & 0xff) * (((1 << gfxMode->linearGreenMaskSize) - 1) / 255.0);
|
||||
uint8_t blue = ((color ) & 0xff) * (((1 << gfxMode->linearBlueMaskSize) - 1) / 255.0);
|
||||
// TODO: !! Important !! - Is should be divided by 255.0 (for floats), but using '-mgeneral-regs-only' removes fp-registers and
|
||||
// wants to use some dumb functions for converting fp numbers in the stdlib (that we don't have)
|
||||
uint8_t red = ((color >> 16) & 0xff) * (((1 << gfxMode->linearRedMaskSize) - 1) / 255);
|
||||
uint8_t green = ((color >> 8 ) & 0xff) * (((1 << gfxMode->linearGreenMaskSize) - 1) / 255);
|
||||
uint8_t blue = ((color ) & 0xff) * (((1 << gfxMode->linearBlueMaskSize) - 1) / 255);
|
||||
|
||||
return (red << gfxMode->redFieldPos) | (green << gfxMode->greenFieldPos) | (blue << gfxMode->blueFieldPos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user