Copy the version string obtained from svnversion at runtime instead of
using it as a constant in several places. Saves a few bytes and the time it takes to recompile a bunch of files whenever svnversion twitches. Using the SVN version string as an integer is not portable as the Unix svnversion always includes e.g. the "M" suffix for a modified tree. Windows people, please check my change to Plugin_VideoDX9/Src/main.cpp as I don't really understand how _T() and the %hs format string work. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5852 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "AboutDolphin.h"
|
||||
#include "svnrev.h"
|
||||
#include "CPUDetect.h"
|
||||
#include "../resources/dolphin_logo.cpp"
|
||||
|
||||
@@ -49,7 +48,7 @@ void AboutDolphin::CreateGUIControls()
|
||||
wxBitmap(iDolphinLogo), wxDefaultPosition, wxDefaultSize, 0);
|
||||
|
||||
std::string Text = std::string("") +
|
||||
"Dolphin SVN revision " + SVN_REV_STR + "\n"
|
||||
"Dolphin SVN revision " + svn_rev_str + "\n"
|
||||
"Copyright (c) 2003-2010+ Dolphin Team\n"
|
||||
"\n"
|
||||
"Dolphin is a Gamecube/Wii emulator, which was\n"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "svnrev.h"
|
||||
|
||||
#include "Common.h" // Common
|
||||
|
||||
@@ -358,15 +357,6 @@ bool DolphinApp::OnInit()
|
||||
|
||||
SetEnableAlert(SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers);
|
||||
|
||||
// Create the window title
|
||||
#ifdef _DEBUG
|
||||
const char *title = "Dolphin Debug SVN R " SVN_REV_STR;
|
||||
#elif defined DEBUGFAST
|
||||
const char *title = "Dolphin Debugfast SVN R " SVN_REV_STR;
|
||||
#else
|
||||
const char *title = "Dolphin SVN R " SVN_REV_STR;
|
||||
#endif
|
||||
|
||||
int x = SConfig::GetInstance().m_LocalCoreStartupParameter.iPosX;
|
||||
int y = SConfig::GetInstance().m_LocalCoreStartupParameter.iPosY;
|
||||
int w = SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth;
|
||||
@@ -383,8 +373,10 @@ bool DolphinApp::OnInit()
|
||||
x = y = -1;
|
||||
#endif
|
||||
|
||||
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY, wxString::FromAscii(title),
|
||||
wxPoint(x, y), wxSize(w, h), UseDebugger, UseLogger);
|
||||
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY,
|
||||
wxString::FromAscii(svn_rev_str),
|
||||
wxPoint(x, y), wxSize(w, h),
|
||||
UseDebugger, UseLogger);
|
||||
SetTopWindow(main_frame);
|
||||
|
||||
#if defined HAVE_X11 && HAVE_X11
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <SFML/Network.hpp>
|
||||
|
||||
#include "GCPadStatus.h"
|
||||
#include "svnrev.h"
|
||||
|
||||
//#include <wx/wx.h>
|
||||
|
||||
@@ -41,20 +40,6 @@ typedef std::vector<Rpt> NetWiimote;
|
||||
|
||||
#define NETPLAY_VERSION "Dolphin NetPlay 2.2"
|
||||
|
||||
#ifdef _M_X64
|
||||
#define NP_ARCH "x64"
|
||||
#else
|
||||
#define NP_ARCH "x86"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define NETPLAY_DOLPHIN_VER SVN_REV_STR" W"NP_ARCH
|
||||
#elif __APPLE__
|
||||
#define NETPLAY_DOLPHIN_VER SVN_REV_STR" M"NP_ARCH
|
||||
#else
|
||||
#define NETPLAY_DOLPHIN_VER SVN_REV_STR" L"NP_ARCH
|
||||
#endif
|
||||
|
||||
// messages
|
||||
#define NP_MSG_PLAYER_JOIN 0x10
|
||||
#define NP_MSG_PLAYER_LEAVE 0x11
|
||||
|
||||
@@ -24,7 +24,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, const s
|
||||
// send connect message
|
||||
sf::Packet spac;
|
||||
spac << NETPLAY_VERSION;
|
||||
spac << NETPLAY_DOLPHIN_VER;
|
||||
spac << netplay_dolphin_ver;
|
||||
spac << name;
|
||||
m_socket.Send(spac);
|
||||
|
||||
@@ -61,7 +61,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, const s
|
||||
Player player;
|
||||
player.name = name;
|
||||
player.pid = m_pid;
|
||||
player.revision = NETPLAY_DOLPHIN_VER;
|
||||
player.revision = netplay_dolphin_ver;
|
||||
|
||||
// add self to player list
|
||||
m_players[m_pid] = player;
|
||||
|
||||
@@ -24,7 +24,7 @@ NetPlayServer::NetPlayServer(const u16 port, const std::string& name, NetPlayDia
|
||||
{
|
||||
Client player;
|
||||
player.pid = 0;
|
||||
player.revision = NETPLAY_DOLPHIN_VER;
|
||||
player.revision = netplay_dolphin_ver;
|
||||
player.socket = m_socket;
|
||||
player.name = name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user