crash handler, logger and oengles changes

* save log messages to otclient.txt
* fixes in FrameBuffer and HardwareBuffer to work with OpenGLES
* possibility to get compilation information from lua (compiler version, build date, build revision, build type)
* make crash handler more informatave
* handle assert crash signals (SIGABRT)
This commit is contained in:
Eduardo Bart
2012-03-22 09:57:43 -03:00
parent 28633a9e20
commit 3ad97c9eab
14 changed files with 128 additions and 63 deletions

View File

@@ -290,6 +290,15 @@ inline std::string resolvePath(const std::string& file, std::string sourcePath)
return sourcePath + file;
}
inline std::string dateTimeString() {
char date[32];
std::time_t tnow;
std::time(&tnow);
std::tm *ts = std::localtime(&tnow);
std::strftime(date, 32, "%b %d %Y %H:%M:%S", ts);
return std::string(date);
}
template<typename T>
T randomRange(T min, T max);