Skip to content

Commit

Permalink
fix: prevent loading savestates when connected
Browse files Browse the repository at this point in the history
  • Loading branch information
JLaferri committed Jul 30, 2024
1 parent 40c22ba commit 2d63a48
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/Core/Core/State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <thread>
#include <utility>
#include <vector>
#include <Core/Slippi/SlippiNetplay.h>

#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
Expand Down Expand Up @@ -190,6 +191,10 @@ void LoadFromBuffer(std::vector<u8>& buffer)
OSD::AddMessage("Loading savestates is disabled in multiplayer Netplay lobbies to prevent desyncs");
return;
}
else if (IsOnline())
{
return; // No loading states when online on slippi either
}

bool wasUnpaused = Core::PauseAndLock(true);

Expand Down Expand Up @@ -532,6 +537,10 @@ void LoadAs(const std::string& filename)
OSD::AddMessage("Loading savestates is disabled in multiplayer Netplay lobbies to prevent desyncs");
return;
}
else if (IsOnline())
{
return; // No loading states when online on slippi either
}

// Stop the core while we load the state
bool wasUnpaused = Core::PauseAndLock(true);
Expand Down

0 comments on commit 2d63a48

Please sign in to comment.