ES-DE/src/platform.cpp

13 lines
266 B
C++
Raw Normal View History

#include "platform.h"
2013-05-13 20:06:18 +00:00
#include <stdlib.h>
std::string getHomePath()
{
//this gives you something like "/home/YOUR_USERNAME" on Linux and "C:\Users\YOUR_USERNAME\" on Windows
const char* home = getenv("HOME");
if(home == NULL)
return "";
else
return home;
}