1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-21 12:06:49 +02:00

compilation fixes...

This commit is contained in:
Zyx-2000 2016-01-16 19:00:53 +01:00
parent cf61837ced
commit 43b364bcd4
3 changed files with 67 additions and 66 deletions

View File

@ -7,6 +7,7 @@
#include "mapHandler.h" #include "mapHandler.h"
#include "../lib/filesystem/Filesystem.h" #include "../lib/filesystem/Filesystem.h"
#include "../lib/filesystem/FileStream.h"
#include "CPreGame.h" #include "CPreGame.h"
#include "windows/CCastleInterface.h" #include "windows/CCastleInterface.h"
#include "../lib/CConsoleHandler.h" #include "../lib/CConsoleHandler.h"

View File

@ -1151,7 +1151,7 @@ void SelectionTab::parseGames(const std::unordered_set<ResourceID> &files, bool
lf >> *(mapInfo.mapHeader.get()) >> mapInfo.scenarioOpts; lf >> *(mapInfo.mapHeader.get()) >> mapInfo.scenarioOpts;
mapInfo.fileURI = file.getName(); mapInfo.fileURI = file.getName();
mapInfo.countPlayers(); mapInfo.countPlayers();
std::time_t time = CFileInfo(*CResourceHandler::get()->getResourceName(file)).getDate(); std::time_t time = boost::filesystem::last_write_time(*CResourceHandler::get()->getResourceName(file));
mapInfo.date = std::asctime(std::localtime(&time)); mapInfo.date = std::asctime(std::localtime(&time));
// If multi mode then only multi games, otherwise single // If multi mode then only multi games, otherwise single
@ -1364,7 +1364,7 @@ void SelectionTab::select( int position )
{ {
auto filename = *CResourceHandler::get("local")->getResourceName( auto filename = *CResourceHandler::get("local")->getResourceName(
ResourceID(curItems[py]->fileURI, EResType::CLIENT_SAVEGAME)); ResourceID(curItems[py]->fileURI, EResType::CLIENT_SAVEGAME));
txt->setText(filename.stem()); txt->setText(filename.stem().string());
} }
onSelect(curItems[py]); onSelect(curItems[py]);

View File

@ -277,7 +277,7 @@ void CClient::loadGame(const std::string & fname, const bool server, const std::
else// create entry for server savegame. Triggered if save was made after launch and not yet present in res handler else// create entry for server savegame. Triggered if save was made after launch and not yet present in res handler
{ {
controlServerSaveName = boost::filesystem::path(clientSaveName).replace_extension(".vsgm1"); controlServerSaveName = boost::filesystem::path(clientSaveName).replace_extension(".vsgm1");
CResourceHandler::get("local")->createResource(controlServerSaveName, true); CResourceHandler::get("local")->createResource(controlServerSaveName.string(), true);
} }
if(clientSaveName.empty()) if(clientSaveName.empty())