Netplay: Only load netplay savestate whenever you are the host. the hostwill share state to the other peers.

This commit is contained in:
Jamie Meyer 2023-05-10 13:25:18 +02:00 committed by GitHub
parent 59bcb05bd0
commit a876a8df55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1315,9 +1315,10 @@ void Netplay::StartNetplaySession(s32 local_handle, u16 local_port, std::string&
Log_ErrorPrint("Failed to Create Netplay Session!");
System::ShutdownSystem(false);
}
else
else if (IsHost())
{
// Load savestate if available
// Load savestate if available and only when you are the host.
// the other peers will get state from the host
std::string save = EmuFolders::SaveStates + "/netplay/" + System::GetRunningSerial() + ".sav";
System::LoadState(save.c_str());
}