mirror of https://github.com/PCSX2/pcsx2.git
USB: Fix loading old states without USB.bin
This commit is contained in:
parent
72d6ff625c
commit
51f29f40ee
|
@ -383,15 +383,15 @@ bool USB::DoState(StateWrapper& sw)
|
|||
{
|
||||
std::array<bool, 2> valid_devices = {};
|
||||
|
||||
if (sw.IsReading())
|
||||
{
|
||||
if (!sw.DoMarker("USB") || !USB::DoOHCIState(sw))
|
||||
{
|
||||
Console.Error("USB state is invalid, resetting.");
|
||||
USBreset();
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (sw.IsReading())
|
||||
{
|
||||
for (u32 port = 0; port < USB::NUM_PORTS; port++)
|
||||
{
|
||||
s32 state_devtype;
|
||||
|
@ -444,6 +444,9 @@ bool USB::DoState(StateWrapper& sw)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!sw.DoMarker("USB") || !USB::DoOHCIState(sw))
|
||||
return false;
|
||||
|
||||
for (u32 port = 0; port < USB::NUM_PORTS; port++)
|
||||
{
|
||||
s32 state_devtype = EmuConfig.USB.Ports[port].DeviceType;
|
||||
|
|
Loading…
Reference in New Issue