PIO: Fix failure to load state with different cart type

This commit is contained in:
Stenzek 2024-12-23 23:53:24 +10:00
parent b8fa97e1a7
commit 00278fa905
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -856,7 +856,7 @@ bool PIO::DoState(StateWrapper& sw)
WARNING_LOG("State contains PIO device {}, expected {}", Settings::GetPIODeviceTypeModeName(device_type),
Settings::GetPIODeviceTypeModeName(g_settings.pio_device_type));
g_pio_device->Reset();
sw.SkipBytes(pio_state_size);
sw.SkipBytes(pio_state_size - sizeof(pio_state_size));
}
return !sw.HasError();