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:
parent
ae791b42b6
commit
6ffec53204
1 changed files with 17 additions and 19 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue