X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/d7b9d0f71d616674ad3d6e26b62198f33e7c5112..8cc40c4dafdeb2d5786695c19163c8e7cc757a46:/aseg/vga-overlay.c?ds=sidebyside diff --git a/aseg/vga-overlay.c b/aseg/vga-overlay.c index 913ebc2..7d107d7 100644 --- a/aseg/vga-overlay.c +++ b/aseg/vga-overlay.c @@ -10,6 +10,7 @@ static char logents[LOGLEN][41] = {{0}}; static int prodptr = 0; +static int flush_imm = 0; #define VRAM_BASE 0xA0000UL #define TEXT_CONSOLE_OFFSET 0x18000UL @@ -18,6 +19,11 @@ static int prodptr = 0; #define COLOR 0x1F +void vga_flush_imm(int imm) +{ + flush_imm = imm; +} + static unsigned char vga_read(unsigned char idx) { outb(CRTC_IDX_REG, idx); @@ -75,7 +81,8 @@ void dolog(const char *s) { strcpy(logents[prodptr], s); prodptr = (prodptr + 1) % LOGLEN; - outlog(); + if (flush_imm) + outlog(); } void (*output)(const char *s) = dolog; @@ -87,7 +94,8 @@ void dologf(const char *fmt, ...) vsnprintf(logents[prodptr], 40, fmt, va); va_end(va); prodptr = (prodptr + 1) % LOGLEN; - outlog(); + if (flush_imm) + outlog(); } void (*outputf)(const char *s, ...) = dologf;