mirror of
https://github.com/edubart/otclient.git
synced 2025-12-26 17:57:11 +01:00
New platform APIs and new OpenAL cmake
This commit is contained in:
@@ -64,6 +64,16 @@ int Platform::getProcessId()
|
||||
return getpid();
|
||||
}
|
||||
|
||||
bool Platform::isProcessRunning(const std::string& name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Platform::killProcess(const std::string& name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string Platform::getTempPath()
|
||||
{
|
||||
return "/tmp/";
|
||||
@@ -74,6 +84,12 @@ bool Platform::copyFile(std::string from, std::string to)
|
||||
return system(stdext::format("/bin/cp '%s' '%s'", from, to).c_str()) == 0;
|
||||
}
|
||||
|
||||
bool Platform::fileExists(const std::string& file)
|
||||
{
|
||||
struct stat buffer;
|
||||
return (stat(file.c_str(), &buffer) == 0);
|
||||
}
|
||||
|
||||
void Platform::openUrl(std::string url)
|
||||
{
|
||||
if(url.find("http://") == std::string::npos)
|
||||
|
||||
Reference in New Issue
Block a user