Add live_textures_reload command

This commit is contained in:
Eduardo Bart
2013-03-01 05:46:55 -03:00
parent e85afd4b63
commit 8314b84f69
15 changed files with 93 additions and 31 deletions

View File

@@ -108,6 +108,14 @@ bool Platform::removeFile(std::string file)
return false;
}
ticks_t Platform::getFileModificationTime(std::string file)
{
struct stat attrib;
if(stat(file.c_str(), &attrib) == 0)
return attrib.st_mtime;
return 0;
}
void Platform::openUrl(std::string url)
{
if(url.find("http://") == std::string::npos)
@@ -160,15 +168,5 @@ std::string Platform::getOSName()
return std::string();
}
time_t Platform::getFileModificationTime(const std::string& filename)
{
struct stat attrib;
if(stat(filename.c_str(), &attrib))
perror(filename.c_str());
else
return attrib.st_mtime;
return 0;
}
#endif