Merge pull request #3859 from Aestek/feature/netplay-md5

Netplay: add md5 testing
This commit is contained in:
Anthony Serna 2016-07-18 09:20:37 -05:00 committed by GitHub
commit 1a81735527
22 changed files with 538 additions and 45 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
@ -152,6 +156,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;
@ -162,6 +167,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;
};