lib/gterm: Try to initialize all 32-bpp framebuffers
This commit is contained in:
parent
45b39285f1
commit
2bba72634f
@ -55,7 +55,9 @@ override CPPFLAGS_FOR_TARGET := \
|
||||
-MMD \
|
||||
-MP
|
||||
|
||||
$(call MKESCAPE,$(BUILDDIR))/./flanterm/backends/fb.o: override CPPFLAGS_FOR_TARGET += -DFLANTERM_FB_DISABLE_BUMP_ALLOC
|
||||
$(call MKESCAPE,$(BUILDDIR))/./flanterm/backends/fb.o: override CPPFLAGS_FOR_TARGET += \
|
||||
-DFLANTERM_FB_DISABLE_BUMP_ALLOC \
|
||||
-DFLANTERM_FB_SUPPORT_BPP
|
||||
|
||||
ifeq ($(TARGET),bios)
|
||||
override CFLAGS_FOR_TARGET += \
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <lib/image.h>
|
||||
#include <mm/pmm.h>
|
||||
#include <flanterm/flanterm.h>
|
||||
#define FLANTERM_FB_SUPPORT_BPP
|
||||
#include <flanterm/backends/fb.h>
|
||||
#include <lib/term.h>
|
||||
|
||||
@ -673,13 +674,8 @@ no_load_font:;
|
||||
for (size_t i = 0; i < fbs_count; i++) {
|
||||
struct fb_info *fb = &fbs[i];
|
||||
|
||||
// Ensure this is xRGB8888, we only support that for the menu
|
||||
if (fb->red_mask_size != 8
|
||||
|| fb->red_mask_shift != 16
|
||||
|| fb->green_mask_size != 8
|
||||
|| fb->green_mask_shift != 8
|
||||
|| fb->blue_mask_size != 8
|
||||
|| fb->blue_mask_shift != 0) {
|
||||
// Ensure that this framebuffer uses 32-bits per pixel.
|
||||
if (fb->framebuffer_bpp != 32) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -714,6 +710,9 @@ no_load_font:;
|
||||
pmm_free,
|
||||
(void *)(uintptr_t)fb->framebuffer_addr,
|
||||
fb->framebuffer_width, fb->framebuffer_height, fb->framebuffer_pitch,
|
||||
fb->red_mask_size, fb->red_mask_shift,
|
||||
fb->green_mask_size, fb->green_mask_shift,
|
||||
fb->blue_mask_size, fb->blue_mask_shift,
|
||||
bg_canvas,
|
||||
ansi_colours, ansi_bright_colours,
|
||||
&default_bg, &default_fg,
|
||||
|
@ -6,7 +6,7 @@ export OBJCOPY_FOR_TARGET
|
||||
export READELF_FOR_TARGET
|
||||
|
||||
override CC := $(CC_FOR_TARGET)
|
||||
CFLAGS = -O2 -g -Wall -Wextra
|
||||
CFLAGS = -O2 -g -Wall -Wextra -DFLANTERM_FB_SUPPORT_BPP
|
||||
LDFLAGS =
|
||||
override LD := $(LD_FOR_TARGET)
|
||||
override QEMU := qemu-system-x86_64
|
||||
|
@ -245,7 +245,13 @@ static void limine_main(void) {
|
||||
fb->address,
|
||||
fb->width,
|
||||
fb->height,
|
||||
fb->pitch
|
||||
fb->pitch,
|
||||
fb->red_mask_size,
|
||||
fb->red_mask_shift,
|
||||
fb->green_mask_size,
|
||||
fb->green_mask_shift,
|
||||
fb->blue_mask_size,
|
||||
fb->blue_mask_shift
|
||||
);
|
||||
|
||||
uint64_t kernel_slide = (uint64_t)kernel_start - 0xffffffff80000000;
|
||||
|
Loading…
Reference in New Issue
Block a user