From cbc7e5a8608dd76aa559c734291d54287698126e Mon Sep 17 00:00:00 2001 From: mintsuki Date: Thu, 13 Apr 2023 18:49:26 +0200 Subject: [PATCH] textmode: Actually disable term hooking on non-managed initialisation --- common/drivers/vga_textmode.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/drivers/vga_textmode.c b/common/drivers/vga_textmode.c index 8f83768c..57e57e10 100644 --- a/common/drivers/vga_textmode.c +++ b/common/drivers/vga_textmode.c @@ -354,7 +354,15 @@ void vga_textmode_init(bool managed) { term->full_refresh(term); - term_backend = TEXTMODE; + if (!managed) { + term->deinit(term, pmm_free); + pmm_free(terms, sizeof(void *)); + terms_i = 0; + terms = NULL; + term_backend = _NOT_READY; + } else { + term_backend = TEXTMODE; + } } #endif