Add md5 testing to netplay

Allows to test current game, an arbitrary game or the sdcard of all players
at once.
This commit is contained in:
Aestek 2016-07-14 00:45:38 +02:00
commit 51c77e8eea
18 changed files with 531 additions and 44 deletions

View file

@ -34,6 +34,10 @@ public:
virtual void OnMsgStopGame() = 0;
virtual bool IsRecording() = 0;
virtual std::string FindGame(const std::string& game) = 0;
virtual void ShowMD5Dialog(const std::string& file_identifier) = 0;
virtual void SetMD5Progress(int pid, int progress) = 0;
virtual void SetMD5Result(int pid, const std::string& result) = 0;
virtual void AbortMD5() = 0;
};
enum class PlayerGameStatus
@ -155,6 +159,7 @@ private:
void Send(sf::Packet& packet);
void Disconnect();
bool Connect();
void ComputeMD5(const std::string& file_identifier);
bool m_is_connected = false;
ConnectionState m_connection_state = ConnectionState::Failure;
@ -165,6 +170,8 @@ private:
std::string m_player_name;
bool m_connecting = false;
TraversalClient* m_traversal_client = nullptr;
std::thread m_MD5_thread;
bool m_should_compute_MD5 = false;
u32 m_timebase_frame = 0;
};