mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-29 02:51:24 +00:00
use _wgetenv instead of getenv on Windows
This commit is contained in:
parent
f735617ee3
commit
f272f3f3f7
1 changed files with 2 additions and 2 deletions
|
@ -36,9 +36,9 @@ String getHomeDir() {
|
|||
char tempDir[4096];
|
||||
|
||||
#ifdef _WIN32
|
||||
char* up=getenv("USERPROFILE");
|
||||
wchar_t* up=_wgetenv(L"USERPROFILE");
|
||||
if (up!=NULL) {
|
||||
ret=up;
|
||||
ret=utf16To8(up);
|
||||
ret+='\\';
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue