keep static device intact (#996)

This commit is contained in:
Logan McNaughton
2026-05-31 18:22:50 +02:00
committed by GitHub
parent 4453e66bcf
commit e25818b451
+2 -2
View File
@@ -121,12 +121,12 @@ pub fn create_savestate(device: &mut device::Device, rewind: bool) {
tokio::task::spawn_blocking(move || {
let mut error = false;
if let Ok(mut device_clone) = DEVICE_CLONE.lock()
if let Ok(device_clone) = DEVICE_CLONE.lock()
&& let Ok(saves_clone) = SAVES_CLONE.lock()
{
if rewind {
let mut state = device::Device::new(false);
std::mem::swap(&mut state, &mut *device_clone);
state.clone_state(device_clone.deref());
if let Ok(mut pool) = rewind_pool.lock() {
pool.push_back(SavestateData {
device: state,