keyboard + linux stuff

This commit is contained in:
vladislav.khorev committed 2013-06-12 16:09:17 +00:00
1 parent a89cfc0371
commit 490cdad867
9 files changed
+136 -1

No files matched your search

+49
View File
@@ -140,6 +140,55 @@ void TFileConsole::PrintImmediate(const std::string& s)
#endif
#ifdef TARGET_LINUX
TFileConsole::TFileConsole()
: filename("conlog.txt")
, f("conlog.txt")
{
}
TFileConsole::TFileConsole(const std::string& Afilename)
: filename(Afilename)
, f(Afilename)
{
}
TFileConsole::~TFileConsole()
{
f.close();
}
TFileConsole& TFileConsole::operator<<(const std::string& s)
{
boost::posix_time::ptime t = boost::posix_time::second_clock::local_time();
std::string string_with_time_mark;
string_with_time_mark = to_simple_string(t)+": "+s;
PrintImmediate(string_with_time_mark);
History += string_with_time_mark+endl;
CutHistory();
return *this;
}
void TFileConsole::PrintImmediate(const std::string& s)
{
f<<s+endl;
f.flush();
}
#endif
+3
View File
@@ -80,6 +80,9 @@ std::string GetFilePathUserData(const std::string& filename)
#ifdef TARGET_WIN32
std::string realFileName = filename;
#endif
#ifdef TARGET_LINUX
std::string realFileName = filename;
#endif
#ifdef TARGET_ANDROID
std::string realFileName = JniGetApplicationDir()+"/" + filename;
#endif