1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-20 00:46:34 +00:00

Remove threading from file write (#226)

This commit is contained in:
jugeeya 2021-08-16 09:35:11 -07:00 committed by GitHub
parent ae791b42b6
commit 6ffec53204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -359,26 +359,24 @@ pub unsafe fn write_menu() {
}
pub unsafe fn spawn_menu() {
std::thread::spawn(||{
let fname = "index.html";
let params = MENU.to_url_params();
let page_response = Webpage::new()
.background(Background::BlurredScreenshot)
.htdocs_dir("contents")
.boot_display(BootDisplay::BlurredScreenshot)
.boot_icon(true)
.start_page(&format!("{}{}", fname, params))
.open()
.unwrap();
let fname = "index.html";
let params = MENU.to_url_params();
let page_response = Webpage::new()
.background(Background::BlurredScreenshot)
.htdocs_dir("contents")
.boot_display(BootDisplay::BlurredScreenshot)
.boot_icon(true)
.start_page(&format!("{}{}", fname, params))
.open()
.unwrap();
let last_url = page_response
.get_last_url()
.unwrap();
let last_url = page_response
.get_last_url()
.unwrap();
set_menu_from_url(last_url);
set_menu_from_url(last_url);
let menu_conf_path = "sd:/TrainingModpack/training_modpack_menu.conf";
std::fs::write(menu_conf_path, last_url)
.expect("Failed to write menu conf file");
});
let menu_conf_path = "sd:/TrainingModpack/training_modpack_menu.conf";
std::fs::write(menu_conf_path, last_url)
.expect("Failed to write menu conf file");
}