diff --git a/code/sys/sys_win32.c b/code/sys/sys_win32.c index f1749ca2..28f9ef34 100644 --- a/code/sys/sys_win32.c +++ b/code/sys/sys_win32.c @@ -38,6 +38,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include #include #include #include @@ -103,7 +104,7 @@ Sys_DefaultHomePath char *Sys_DefaultHomePath( void ) { TCHAR szPath[MAX_PATH]; - FARPROC qSHGetFolderPath; + PFNSHGETFOLDERPATHA qSHGetFolderPath; HMODULE shfolder = LoadLibrary("shfolder.dll"); if(shfolder == NULL) @@ -114,7 +115,7 @@ char *Sys_DefaultHomePath( void ) if(!*homePath && com_homepath) { - qSHGetFolderPath = GetProcAddress(shfolder, "SHGetFolderPathA"); + qSHGetFolderPath = (PFNSHGETFOLDERPATHA)GetProcAddress(shfolder, "SHGetFolderPathA"); if(qSHGetFolderPath == NULL) { Com_Printf("Unable to find SHGetFolderPath in SHFolder.dll\n"); @@ -239,7 +240,7 @@ char* Sys_MicrosoftStorePath(void) if (!microsoftStorePath[0]) { TCHAR szPath[MAX_PATH]; - FARPROC qSHGetFolderPath; + PFNSHGETFOLDERPATHA qSHGetFolderPath; HMODULE shfolder = LoadLibrary("shfolder.dll"); if(shfolder == NULL) @@ -248,7 +249,7 @@ char* Sys_MicrosoftStorePath(void) return microsoftStorePath; } - qSHGetFolderPath = GetProcAddress(shfolder, "SHGetFolderPathA"); + qSHGetFolderPath = (PFNSHGETFOLDERPATHA)GetProcAddress(shfolder, "SHGetFolderPathA"); if(qSHGetFolderPath == NULL) { Com_Printf("Unable to find SHGetFolderPath in SHFolder.dll\n");