mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-26 00:52:50 +00:00
feat(gui): Enable direct boot to GUI Desktop with emergency kernel TTY fallback
- Integrate Bochs/QEMU VBE physical LFB mapping directly to hardware video memory (0xFD000000) - Update kernel boot sequence to directly boot into GUI Desktop by default - Fall back to Emergency Kernel TTY Mode upon GUI exit (Esc key / Exit menu item) - Support 'nogui', 'text', 'emergency', and 'single' boot arguments to boot directly into text mode - Remove frame limits so GUI runs persistently
This commit is contained in:
1 parent
81a17aae37
commit
56d8b3af1a
5 files changed
+75
-49
No files matched your search
+13
-1
@@ -22,13 +22,25 @@ const fb_info_t* fb_get_info(void) {
|
||||
return &fb_info;
|
||||
}
|
||||
|
||||
void fb_set_hardware_lfb(uint32_t* lfb_addr, uint32_t width, uint32_t height, uint8_t bpp) {
|
||||
if (lfb_addr) {
|
||||
fb_info.address = lfb_addr;
|
||||
fb_info.width = width;
|
||||
fb_info.height = height;
|
||||
fb_info.pitch = width * (bpp / 8);
|
||||
fb_info.bpp = bpp;
|
||||
fb_info.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
void fb_put_pixel(uint32_t x, uint32_t y, uint32_t color) {
|
||||
if (x < fb_info.width && y < fb_info.height) {
|
||||
if (fb_info.address && x < fb_info.width && y < fb_info.height) {
|
||||
fb_info.address[y * fb_info.width + x] = color;
|
||||
}
|
||||
}
|
||||
|
||||
void fb_draw_rect(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t color) {
|
||||
if (!fb_info.address) return;
|
||||
for (uint32_t j = y; j < y + h && j < fb_info.height; j++) {
|
||||
for (uint32_t i = x; i < x + w && i < fb_info.width; i++) {
|
||||
fb_info.address[j * fb_info.width + i] = color;
|
||||
|
||||
Reference in new issue
Block a user