Common: Move version strings to their own header
Ideally Common.h wouldn't be a header in the Common library, and instead be renamed to something else, like PlatformCompatibility.h or something, but even then, there's still some things in the header that don't really fall under that label This moves the version strings out to their own version header that doesn't dump a bunch of other unrelated things into scope, like what Common.h was doing. This also places them into the Common namespace, as opposed to letting them sit in the global namespace.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/Version.h"
|
||||
#include "DolphinWX/AboutDolphin.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
|
||||
@@ -24,12 +24,13 @@ AboutDolphin::AboutDolphin(wxWindow* parent, wxWindowID id, const wxString& titl
|
||||
this, wxID_ANY, WxUtils::LoadScaledResourceBitmap("dolphin_logo", this));
|
||||
|
||||
const wxString DolphinText = _("Dolphin");
|
||||
const wxString RevisionText = scm_desc_str;
|
||||
const wxString RevisionText = Common::scm_desc_str;
|
||||
const wxString CopyrightText =
|
||||
_("(c) 2003-2015+ Dolphin Team. \"GameCube\" and \"Wii\" are trademarks of Nintendo. Dolphin "
|
||||
"is not affiliated with Nintendo in any way.");
|
||||
const wxString BranchText = wxString::Format(_("Branch: %s"), scm_branch_str.c_str());
|
||||
const wxString BranchRevText = wxString::Format(_("Revision: %s"), scm_rev_git_str.c_str());
|
||||
const wxString BranchText = wxString::Format(_("Branch: %s"), Common::scm_branch_str.c_str());
|
||||
const wxString BranchRevText =
|
||||
wxString::Format(_("Revision: %s"), Common::scm_rev_git_str.c_str());
|
||||
const wxString CheckUpdateText = _("Check for updates: ");
|
||||
const wxString Text =
|
||||
_("\n"
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "Common/Logging/ConsoleListener.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Common/Version.h"
|
||||
|
||||
#include "Core/Config/GraphicsSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
@@ -758,7 +759,7 @@ void CFrame::UninhibitScreensaver()
|
||||
|
||||
void CFrame::UpdateTitle(const wxString& str)
|
||||
{
|
||||
const wxString revision_string = StrToWxStr(scm_rev_str);
|
||||
const wxString revision_string = StrToWxStr(Common::scm_rev_str);
|
||||
if (SConfig::GetInstance().bRenderToMain && SConfig::GetInstance().m_InterfaceStatusbar)
|
||||
{
|
||||
GetStatusBar()->SetStatusText(str, 0);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/NandPaths.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Version.h"
|
||||
|
||||
#include "Core/Boot/Boot.h"
|
||||
#include "Core/BootManager.h"
|
||||
@@ -916,7 +917,7 @@ void CFrame::OnStopped()
|
||||
|
||||
UninhibitScreensaver();
|
||||
|
||||
m_render_frame->SetTitle(StrToWxStr(scm_rev_str));
|
||||
m_render_frame->SetTitle(StrToWxStr(Common::scm_rev_str));
|
||||
|
||||
// Destroy the renderer frame when not rendering to main
|
||||
m_render_parent->Unbind(wxEVT_SIZE, &CFrame::OnRenderParentResize, this);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "Common/Logging/LogManager.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Common/Version.h"
|
||||
|
||||
#include "Core/Analytics.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
@@ -151,7 +152,7 @@ bool DolphinApp::OnInit()
|
||||
// event dispatch including WM_MOVE/WM_SIZE)
|
||||
wxRect window_geometry(SConfig::GetInstance().iPosX, SConfig::GetInstance().iPosY,
|
||||
SConfig::GetInstance().iWidth, SConfig::GetInstance().iHeight);
|
||||
main_frame = new CFrame(nullptr, wxID_ANY, StrToWxStr(scm_rev_str), window_geometry,
|
||||
main_frame = new CFrame(nullptr, wxID_ANY, StrToWxStr(Common::scm_rev_str), window_geometry,
|
||||
m_use_debugger, m_batch_mode, m_use_logger);
|
||||
SetTopWindow(main_frame);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user