[colobot] 149/390: Added some debug stuff, possible fix for #348 and #335
Didier Raboud
odyx at moszumanska.debian.org
Fri Jun 12 14:21:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch upstream/latest
in repository colobot.
commit c1f931c8ee301ffb49871ead236b048f168916da
Author: krzys-h <krzys_h at interia.pl>
Date: Thu Oct 30 22:17:47 2014 +0100
Added some debug stuff, possible fix for #348 and #335
---
src/app/app.cpp | 2 ++
src/ui/maindialog.cpp | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/app/app.cpp b/src/app/app.cpp
index ea54cf1..ae1f82a 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -420,6 +420,8 @@ bool CApplication::Create()
LoadModsFromDir(m_dataPath+"/mods");
LoadModsFromDir(m_savePath+"/mods");
+ GetLogger()->Info("Data path: %s\n", m_dataPath.c_str());
+ GetLogger()->Info("Save path: %s\n", m_savePath.c_str());
CResourceManager::AddLocation(m_dataPath, false);
CResourceManager::SetSaveLocation(m_savePath);
CResourceManager::AddLocation(m_savePath, true);
diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp
index 051cd94..21e2b74 100644
--- a/src/ui/maindialog.cpp
+++ b/src/ui/maindialog.cpp
@@ -185,6 +185,7 @@ CMainDialog::CMainDialog()
m_savegameDir = "savegame";
m_publicDir = CResourceManager::GetSaveLocation()+"/program"; //TODO: Refactor to use PHYSFS
m_filesDir = CResourceManager::GetSaveLocation()+"/files"; //TODO: Refactor to use PHYSFS
+ CLogger::GetInstancePointer()->Trace("Savegame path: normal=%s, physfs=%s\n", GetSavegameDir().c_str(), GetPHYSFSSavegameDir().c_str());
m_setupFull = m_app->GetVideoConfig().fullScreen;
@@ -4165,7 +4166,7 @@ void CMainDialog::IOUpdateList()
return;
std::string filename = (m_saveList.at(sel) / "screen.png").make_preferred().string();
- boost::replace_all(filename, CResourceManager::GetSaveLocation()+"/", ""); //TODO: Refactor everything to PHYSFS, see issue #334
+ boost::replace_all(filename, GetSavegameDir(), GetPHYSFSSavegameDir()); //TODO: Refactor everything to PHYSFS, see issue #334
filename = "../"+filename;
if ( m_phase == PHASE_WRITE || m_phase == PHASE_WRITEs )
{
@@ -6000,7 +6001,9 @@ bool CMainDialog::GetSceneSoluce()
std::string CMainDialog::GetSavegameDir()
{
- return CResourceManager::GetSaveLocation()+"/"+m_savegameDir;
+ std::string out = CResourceManager::GetSaveLocation()+"/"+m_savegameDir;
+ boost::replace_all(out, "\\", "/");
+ return out;
}
//TODO: Use PHYSFS everywhere
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list