windows: Workaround GetUserProfileDirectory's API change in Win10 build 1809.
This commit is contained in:
parent
4a56820f1d
commit
9ef9a06db3
|
@ -566,7 +566,6 @@ char *__PHYSFS_platformCalcUserDir(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DWORD psize = 0;
|
DWORD psize = 0;
|
||||||
WCHAR dummy = 0;
|
|
||||||
LPWSTR wstr = NULL;
|
LPWSTR wstr = NULL;
|
||||||
BOOL rc = 0;
|
BOOL rc = 0;
|
||||||
|
|
||||||
|
@ -575,7 +574,7 @@ char *__PHYSFS_platformCalcUserDir(void)
|
||||||
* psize. Also note that the second parameter can't be
|
* psize. Also note that the second parameter can't be
|
||||||
* NULL or the function fails.
|
* NULL or the function fails.
|
||||||
*/
|
*/
|
||||||
rc = pGetDir(accessToken, &dummy, &psize);
|
rc = pGetDir(accessToken, NULL, &psize);
|
||||||
GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done); /* should have failed! */
|
GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done); /* should have failed! */
|
||||||
|
|
||||||
/* Allocate memory for the profile directory */
|
/* Allocate memory for the profile directory */
|
||||||
|
|
Loading…
Reference in New Issue