Added some debug stuff, possible fix for #348 and #335

dev-mp
krzys-h 2014-10-30 22:17:47 +01:00
parent 066344dde3
commit c1f931c8ee
2 changed files with 7 additions and 2 deletions

View File

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

View File

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