From 3eedac5effab10fd70cc5c40ae86b663ae2e879c Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 23 Nov 2020 16:57:12 +0200 Subject: [PATCH] Don't attempt to set video unless asked to --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 599ecb8..be7c1c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -80,7 +80,9 @@ fn main() -> Result<(), BootError> { data.set_acpi_rsdp(rsdp.unwrap_or(core::ptr::null_mut()) as usize); data.set_loader_magic(); - video::set_mode(bs, data)?; + if (data.get_flags() & yboot2_proto::FLAG_VIDEO) != 0 { + video::set_mode(bs, data)?; + } // Get the new memory map and terminate boot services bs.get_memory_map(&mut mmap).map_err(BootError::MemoryMapError)?;