mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-03 14:38:08 +00:00
Forgot to save a file. Oops.
This commit is contained in:
parent
4cc9e33c55
commit
f6115375ab
@ -92,9 +92,9 @@ std::string musik::core::GetHomeDirectory() {
|
|||||||
std::string directory;
|
std::string directory;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
DWORD bufferSize = GetEnvironmentVariable(_T("APPDATA"), 0, 0);
|
DWORD bufferSize = GetEnvironmentVariable(_T("HOMEPATH"), 0, 0);
|
||||||
wchar_t *buffer = new wchar_t[bufferSize + 2];
|
wchar_t *buffer = new wchar_t[bufferSize + 2];
|
||||||
GetEnvironmentVariable(_T("APPDATA"), buffer, bufferSize);
|
GetEnvironmentVariable(_T("HOMEPATH"), buffer, bufferSize);
|
||||||
directory.assign(u16to8(buffer));
|
directory.assign(u16to8(buffer));
|
||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
#else
|
#else
|
||||||
@ -105,11 +105,17 @@ std::string musik::core::GetHomeDirectory() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string musik::core::GetDataDirectory() {
|
std::string musik::core::GetDataDirectory() {
|
||||||
std::string directory = GetHomeDirectory();
|
std::string directory;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
DWORD bufferSize = GetEnvironmentVariable(_T("APPDATA"), 0, 0);
|
||||||
|
wchar_t *buffer = new wchar_t[bufferSize + 2];
|
||||||
|
GetEnvironmentVariable(_T("APPDATA"), buffer, bufferSize);
|
||||||
|
directory.assign(u16to8(buffer));
|
||||||
directory.append("/mC2/");
|
directory.append("/mC2/");
|
||||||
|
delete[] buffer;
|
||||||
#else
|
#else
|
||||||
|
directory = std::string(std::getenv("HOME"));
|
||||||
directory.append("/.mC2/");
|
directory.append("/.mC2/");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user