From 40c7a2fb7d4129dc96d767ce123f06be35a47539 Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 6 Jan 2016 23:46:50 +0100 Subject: [PATCH] Use the current commit hash in the netplay version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So that it contains the current commit and not an arbitrary date that may or may not be up-to-date. This will cause tears as people will not be able to use netplay with one diverging commit that does not touch anything related. On the other hand, users can’t be trusted. --- Source/Core/Core/NetPlayClient.cpp | 2 ++ Source/Core/Core/NetPlayProto.h | 2 -- Source/Core/Core/NetPlayServer.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index 841d6a62f7..d627c1fdb0 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "Common/Common.h" #include "Common/ENetUtil.h" #include "Common/Timer.h" #include "Core/ConfigManager.h" @@ -19,6 +20,7 @@ #include "Core/IPC_HLE/WII_IPC_HLE_Device_usb.h" #include "Core/IPC_HLE/WII_IPC_HLE_WiiMote.h" +static const char* NETPLAY_VERSION = scm_rev_git_str; static std::mutex crit_netplay_client; static NetPlayClient * netplay_client = nullptr; NetSettings g_NetPlaySettings; diff --git a/Source/Core/Core/NetPlayProto.h b/Source/Core/Core/NetPlayProto.h index 7f81d18622..1fe2345482 100644 --- a/Source/Core/Core/NetPlayProto.h +++ b/Source/Core/Core/NetPlayProto.h @@ -9,8 +9,6 @@ #include "Common/CommonTypes.h" #include "Core/HW/EXI_Device.h" -#define NETPLAY_VERSION "Dolphin NetPlay 2015-06-24" - struct NetSettings { bool m_CPUthread; diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index 1be36fa487..692beb20f1 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -5,6 +5,7 @@ #include #include #include +#include "Common/Common.h" #include "Common/ENetUtil.h" #include "Common/FileUtil.h" #include "Common/IniFile.h" @@ -24,6 +25,7 @@ #include #endif +static const char* NETPLAY_VERSION = scm_rev_git_str; u64 g_netplay_initial_gctime = 1272737767; NetPlayServer::~NetPlayServer()