mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
Possible win95 fix
git-svn-id: https://svn.eduke32.com/eduke32@632 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
aa5360a235
commit
a735c3d1ac
1 changed files with 5 additions and 2 deletions
|
@ -335,10 +335,13 @@ char *Bgetcwd(char *buf, bsize_t size)
|
|||
char *Bgethomedir(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
FARPROC aSHGetSpecialFolderPathA;
|
||||
TCHAR appdata[MAX_PATH];
|
||||
|
||||
if (SUCCEEDED(SHGetSpecialFolderPathA(NULL, appdata, CSIDL_APPDATA, FALSE)))
|
||||
return strdup(appdata);
|
||||
aSHGetSpecialFolderPathA = GetProcAddress(GetModuleHandle("shell32.dll"), "SHGetSpecialFolderPathA");
|
||||
if (aSHGetSpecialFolderPathA != NULL)
|
||||
if (SUCCEEDED(aSHGetSpecialFolderPathA(NULL, appdata, CSIDL_APPDATA, FALSE)))
|
||||
return strdup(appdata);
|
||||
return NULL;
|
||||
#elif defined __APPLE__
|
||||
FSRef ref;
|
||||
|
|
Loading…
Reference in a new issue