mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 05:53:26 +02:00
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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user