Set default graphics size

parent eeaf0be9
use std::{env, fs, io};
use std::io::{Seek, Write};
use std::path::{Path, PathBuf};
use std::process::{self, Command};
......@@ -164,6 +165,26 @@ fn inner(arguments: &[String], folder_opt: Option<String>, gui: bool) -> io::Res
redoxfs.unmount()?;
}
// Set default bootloader configuration
if gui {
let mut f = fs::OpenOptions::new()
.write(true)
.open(&redoxer_bin)?;
// Configuration is stored in the third sector
f.seek(io::SeekFrom::Start(512 * 3))?;
// Width and height are stored as two u16 values
let width = 1024;
let height = 768;
f.write(&[
width as u8,
(width >> 8) as u8,
height as u8,
(height >> 8) as u8,
])?;
}
let redoxer_log = tempdir.path().join("redoxer.log");
let mut command = Command::new("kvm");
command
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment