[colobot] 185/390: Fixed screenshot saving
Didier Raboud
odyx at moszumanska.debian.org
Fri Jun 12 14:21:43 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 5bb740696fe1b913bc16b886e8bedb74b5d64b1c
Author: krzys-h <krzys_h at interia.pl>
Date: Mon Nov 10 17:50:36 2014 +0100
Fixed screenshot saving
---
src/ui/maindialog.cpp | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp
index f57d04e..b6ef049 100644
--- a/src/ui/maindialog.cpp
+++ b/src/ui/maindialog.cpp
@@ -179,8 +179,6 @@ 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*/
m_publicDir = "program";
m_filesDir = "files";
CLogger::GetInstancePointer()->Trace("Savegame path: normal=%s, physfs=%s\n", GetSavegameDir().c_str(), GetPHYSFSSavegameDir().c_str());
@@ -4151,7 +4149,7 @@ bool CMainDialog::IOWriteScene()
pe->GetText(info, 100);
if (static_cast<unsigned int>(sel) >= m_saveList.size())
{
- dir = m_savegameDir + "/" + m_main->GetGamerName() + "/" + "save" + clearName(info);
+ dir = m_savegameDir + "/" + m_main->GetGamerName() + "/save" + clearName(info);
}
else
{
@@ -4163,12 +4161,12 @@ bool CMainDialog::IOWriteScene()
CResourceManager::CreateDirectory(dir);
}
- std::string savegameFileName = dir + "/" + "data.sav";
- std::string fileCBot = dir + "/" + "cbot.run";
+ std::string savegameFileName = dir + "/data.sav";
+ std::string fileCBot = CResourceManager::GetSaveLocation() + "/" + dir + "/cbot.run";
m_main->IOWriteScene(savegameFileName.c_str(), fileCBot.c_str(), info);
m_shotDelay = 3;
- m_shotName = dir + "/" + "screen.png";
+ m_shotName = CResourceManager::GetSaveLocation() + "/" + dir + "/screen.png"; //TODO: Use PHYSFS?
return true;
}
--
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