]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
get SHGetKnownFolderPath the right way
authorRudolf Polzer <divverent@alientrap.org>
Tue, 3 May 2011 06:09:22 +0000 (08:09 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 3 May 2011 06:09:22 +0000 (08:09 +0200)
radiant/mainframe.cpp

index bddb333ef9acb01e4381cc573b700cca9569309c..d168c77de22d17513379ad7cf4c34a253b65a1c0 100644 (file)
@@ -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);