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:
Soren Jorvang
2010-07-08 15:25:01 +00:00
parent 75be9ce40d
commit 39ae36398f
14 changed files with 21 additions and 51 deletions

View File

@ -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