|
|
@@ -11,6 +11,8 @@
|
|
|
|
|
|
#ifdef PHYSFS_PLATFORM_WINDOWS
|
|
|
|
|
|
+typedef void (*fnFunctionPointer)(void);
|
|
|
+
|
|
|
/* Forcibly disable UNICODE macro, since we manage this ourselves. */
|
|
|
#ifdef UNICODE
|
|
|
#undef UNICODE
|
|
|
@@ -249,7 +251,7 @@ static DWORD pollDiscDrives(void)
|
|
|
DWORD i;
|
|
|
|
|
|
if (lib)
|
|
|
- stem = (fnSTEM) GetProcAddress(lib, "SetThreadErrorMode");
|
|
|
+ stem = (fnSTEM)(fnFunctionPointer) GetProcAddress(lib, "SetThreadErrorMode");
|
|
|
|
|
|
if (stem)
|
|
|
stem(SEM_FAILCRITICALERRORS, &oldErrorMode);
|
|
|
@@ -558,7 +560,7 @@ char *__PHYSFS_platformCalcUserDir(void)
|
|
|
|
|
|
lib = LoadLibraryA("userenv.dll");
|
|
|
BAIL_IF(!lib, errcodeFromWinApi(), NULL);
|
|
|
- pGetDir=(fnGetUserProfDirW) GetProcAddress(lib,"GetUserProfileDirectoryW");
|
|
|
+ pGetDir=(fnGetUserProfDirW)(fnFunctionPointer) GetProcAddress(lib,"GetUserProfileDirectoryW");
|
|
|
GOTO_IF(!pGetDir, errcodeFromWinApi(), done);
|
|
|
|
|
|
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &accessToken))
|