Skip to content

Commit 7be9e68

Browse files
committed
Add TODO for VESA resolution config
1 parent b937096 commit 7be9e68

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bios/stage-2/src/main.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,15 @@ fn start(disk_number: u16, partition_table_start: *const u8) -> ! {
108108
let memory_map = memory_map::query_memory_map().unwrap();
109109
writeln!(screen::Writer, "{memory_map:x?}").unwrap();
110110

111+
// TODO: load these from the kernel's config instead of hardcoding
112+
let max_width = 1000;
113+
let max_height = 1000;
114+
111115
let mut vesa_info = vesa::VesaInfo::query(disk_buffer).unwrap();
112-
let vesa_mode = vesa_info.get_best_mode(1000, 1000).unwrap().unwrap();
116+
let vesa_mode = vesa_info
117+
.get_best_mode(max_width, max_height)
118+
.unwrap()
119+
.unwrap();
113120
writeln!(
114121
screen::Writer,
115122
"VESA MODE: {}x{}",

0 commit comments

Comments
 (0)