Make netplay's "same game" check more robust

Instead of comparing the game ID, revision, disc number and name,
we can compare a hash of important parts of the disc including
all the aforementioned data but also additional data such as the
FST. The primary reason why I'm making this change is to let us
catch more desyncs before they happen, but this should also fix
https://bugs.dolphin-emu.org/issues/12115. As a bonus, the UI can
now distinguish the case where a client doesn't have the game at
all from the case where a client has the wrong version of the game.
This commit is contained in:
JosJuice
2020-06-07 22:58:03 +02:00
parent 25ebc3c07c
commit a41166bb37
34 changed files with 502 additions and 148 deletions

View File

@ -1374,7 +1374,7 @@ bool MainWindow::NetPlayJoin()
return true;
}
bool MainWindow::NetPlayHost(const QString& game_id)
bool MainWindow::NetPlayHost(const UICommon::GameFile& game)
{
if (Core::IsRunning())
{
@ -1419,7 +1419,8 @@ bool MainWindow::NetPlayHost(const QString& game_id)
return false;
}
Settings::Instance().GetNetPlayServer()->ChangeGame(game_id.toStdString());
Settings::Instance().GetNetPlayServer()->ChangeGame(game.GetSyncIdentifier(),
game.GetNetPlayName());
// Join our local server
return NetPlayJoin();