[springlobby] 11/13: New upstream version 0.262+dfsg

Markus Koschany apo at moszumanska.debian.org
Sat Jan 6 00:20:28 UTC 2018


This is an automated email from the git hooks/post-receive script.

apo pushed a commit to branch master
in repository springlobby.

commit 31e955cfebbdcf28b1a1e13648ff0a1d1f97a2e6
Author: Markus Koschany <apo at debian.org>
Date:   Sat Jan 6 01:01:40 2018 +0100

    New upstream version 0.262+dfsg
---
 ChangeLog                         |  4 ++++
 VERSION                           |  2 +-
 springlobby_config.h              |  2 +-
 src/gui/hosting/battleroomtab.cpp |  4 ++++
 src/replaylist.cpp                | 12 ++++++++++++
 src/tasserver.cpp                 |  2 +-
 src/utils/wxTranslationHelper.cpp | 16 ++++++++++------
 7 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7170169..60acefd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 ChangeLog of Springlobby
 
+## 0.262
+ - fix demo replay (spring engine not found)
+ - fix "autolaunch game"
+
 ## 0.261
  - fix rare crash on login / register
  - add option to not launch spring when speccing a battle
diff --git a/VERSION b/VERSION
index fdf0878..f22b3ff 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.261
+0.262
diff --git a/springlobby_config.h b/springlobby_config.h
index 1e19f31..1772116 100644
--- a/springlobby_config.h
+++ b/springlobby_config.h
@@ -6,6 +6,6 @@
 #undef VERSION
 
 /* the git tag / commit we build from */
-#define VERSION "0.261"
+#define VERSION "0.262"
 
 #endif	/* SPRINGLOBBY_HEADERGUARD_CONFIG_H */
diff --git a/src/gui/hosting/battleroomtab.cpp b/src/gui/hosting/battleroomtab.cpp
index b2e3968..36a536c 100644
--- a/src/gui/hosting/battleroomtab.cpp
+++ b/src/gui/hosting/battleroomtab.cpp
@@ -630,6 +630,8 @@ void BattleRoomTab::OnStart(wxCommandEvent& /*unused*/)
 	slLogDebugFunc("");
 	if (m_battle == nullptr)
 		return;
+
+	//start manually clicked, force start
 	m_battle->SetAutolaunchGame(true);
 
 	if (m_battle->IsFounderMe()) {
@@ -659,6 +661,8 @@ void BattleRoomTab::OnStart(wxCommandEvent& /*unused*/)
 			//customMessageBoxNoModal( SL_MAIN_ICON, _("Host is not ingame."), _("Error") );
 		}
 	}
+	//reset to value from gui
+	m_battle->SetAutolaunchGame(m_autolaunch_chk->GetValue());
 }
 
 void BattleRoomTab::OnLeave(wxCommandEvent& /*unused*/)
diff --git a/src/replaylist.cpp b/src/replaylist.cpp
index 40c6a2b..c1b35fd 100644
--- a/src/replaylist.cpp
+++ b/src/replaylist.cpp
@@ -13,6 +13,7 @@
 #include "storedgame.h"
 #include "utils/conversion.h"
 #include <lslutils/globalsmanager.h>
+#include <lslutils/conversion.h>
 
 class PlayBackDataReader
 {
@@ -115,6 +116,15 @@ static void MarkBroken(StoredGame& ret)
 	ret.battle.SetHostGame("broken", "");
 }
 
+static void FixSpringVersion(StoredGame& ret)
+{
+	const int version = LSL::Util::FromIntString(ret.SpringVersion);
+	if (LSL::Util::ToIntString(version) != ret.SpringVersion)
+		return;
+
+	ret.SpringVersion = ret.SpringVersion + ".0";
+}
+
 bool ReplayList::GetReplayInfos(const std::string& ReplayPath, StoredGame& ret) const
 {
 	const std::string FileName = LSL::Util::AfterLast(ReplayPath, SEP); // strips file path
@@ -125,6 +135,8 @@ bool ReplayList::GetReplayInfos(const std::string& ReplayPath, StoredGame& ret)
 	ret.MapName = LSL::Util::BeforeLast(FileName, "_");
 	ret.size = wxFileName::GetSize(ReplayPath).GetLo(); //FIXME: use longlong
 
+	FixSpringVersion(ret);
+
 	if (!wxFileExists(TowxString(ReplayPath))) {
 		wxLogWarning(wxString::Format(_T("File %s does not exist!"), ReplayPath.c_str()));
 		MarkBroken(ret);
diff --git a/src/tasserver.cpp b/src/tasserver.cpp
index 57e5a5f..c57e7aa 100644
--- a/src/tasserver.cpp
+++ b/src/tasserver.cpp
@@ -965,7 +965,7 @@ void TASServer::ExecuteCommand(const std::string& cmd, const std::string& inpara
 
 void TASServer::ParseJson(const std::string& jsonstr)
 {
-	wxLogMessage("JSON %s", jsonstr.c_str());
+	wxLogDebug("JSON %s", jsonstr.c_str());
 
         Json::Value js; // will contains the root value after parsing.
         Json::Reader reader;
diff --git a/src/utils/wxTranslationHelper.cpp b/src/utils/wxTranslationHelper.cpp
index e494fca..75d7ff4 100644
--- a/src/utils/wxTranslationHelper.cpp
+++ b/src/utils/wxTranslationHelper.cpp
@@ -17,12 +17,16 @@ wxTranslationHelper::wxTranslationHelper(const wxString& catalog, const wxString
     , catalogname(catalog)
     , m_Locale(NULL)
 {
-	wxLogWarning(_T("Using LocalePath %s"), m_SearchPath.c_str());
+	wxLogInfo(_T("Using LocalePath %s"), m_SearchPath.c_str());
 	long language = cfg().ReadLong(_T("/General/LanguageID"));
-	if (!Load(language)) { //fallback when something went wrong
-		wxLogWarning("Couldn't load locale %ld, fallback to default", language);
-		int localeid = wxLocale::GetSystemLanguage();
-		Load(localeid);
+	if (Load(language))
+		return;
+	//fallback when something went wrong
+	wxLogWarning("Couldn't load locale %ld, fallback to default", language);
+	language = wxLocale::GetSystemLanguage();
+	if (Load(language)) {
+		cfg().Write(_T( "/General/LanguageID" ), language);
+		cfg().SaveFile(); //instant save to config
 	}
 }
 
@@ -54,7 +58,7 @@ bool wxTranslationHelper::Load(int language)
 			m_Locale->AddCatalogLookupPathPrefix(m_SearchPath);
 			m_Locale->AddCatalog(catalogname);
 			//m_Locale->AddCatalog(_T("wxstd"));
-			wxLogWarning(wxString::Format(_("Loaded locale %s %d %s %s"), m_Locale->GetName().c_str(), m_Locale->IsOk(), m_SearchPath.c_str(), m_Locale->GetCanonicalName().c_str()));
+			wxLogMessage(wxString::Format(_("Loaded locale %s %d %s %s"), m_Locale->GetName().c_str(), m_Locale->IsOk(), m_SearchPath.c_str(), m_Locale->GetCanonicalName().c_str()));
 			return m_Locale->IsOk();
 		}
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/springlobby.git



More information about the Pkg-games-commits mailing list