write savestate in thread (#708)

This commit is contained in:
Logan McNaughton 2026-04-03 08:32:40 -06:00 committed by GitHub
parent e72ddf73f0
commit d378ae187a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,12 +81,11 @@ pub fn create_savestate(device: &device::Device) {
),
(&rdp_state, "rdp_state"),
];
let save_path = device.ui.storage.paths.savestate_file_path.clone();
let compressed_file = ui::storage::compress_file(data);
std::fs::write(
device.ui.storage.paths.savestate_file_path.clone(),
compressed_file,
)
.unwrap();
tokio::spawn(async move {
tokio::fs::write(save_path, compressed_file).await.unwrap();
});
ui::video::onscreen_message(
&device.ui,
&format!(