From: Rudolf Polzer Date: Tue, 3 May 2011 06:09:22 +0000 (+0200) Subject: get SHGetKnownFolderPath the right way X-Git-Tag: xonotic-v0.5.0~28^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1e5ac483a52ed1d72726fe74d9f5b875659a79f4;p=xonotic%2Fnetradiant.git get SHGetKnownFolderPath the right way --- diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index bddb333e..d168c77d 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -216,11 +216,11 @@ void HomePaths_Realise() wchar_t *mydocsdirw; HMODULE shfolder = LoadLibrary("shfolder.dll"); if(shfolder) - qSHGetKnownFolderPath = GetProcAddress("SHGetFolderPathA"); + qSHGetKnownFolderPath = GetProcAddress("SHGetKnownFolderPath"); else qSHGetKnownFolderPath = NULL; CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - if(qSHGetKnownFolderPath && qSHGetKnownFolderPath(qFOLDERID_SavedGames, qKF_FLAG_CREATE | qKF_FLAG_NO_ALIAS, NULL, &mydocsdirw) == S_OK) + if(qSHGetKnownFolderPath && qSHGetKnownFolderPath(&qFOLDERID_SavedGames, qKF_FLAG_CREATE | qKF_FLAG_NO_ALIAS, NULL, &mydocsdirw) == S_OK) { memset(mydocsdir, 0, sizeof(mydocsdir)); wctombs(mydocsdir, mydocsdirw, sizeof(mydocsdir)-1);