Commits

Stefan Cosma committed 4d3eef8

Fix GetConfigFileDir and winver for Windows XP

Comments (0)

Files changed (3)

Plugin/HotKeyManager.cpp

 	TCHAR path[MAX_PATH];
 	ZeroMemory(path, sizeof(TCHAR) * MAX_PATH);
 
-	if (osvi.dwMajorVersion > 5)
-	{
-		// Vista and above
-		SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, path);
-		dir.append(path);
-		dir.append(TEXT("\\Apple Computer"));
-	}
-	else
-	{
-		// XP and 2000
-		SHGetFolderPath(NULL, CSIDL_MYMUSIC, NULL, 0, path);
-		dir.append(path);
-	}
+	SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, path);
+	dir.append(path);
+	dir.append(TEXT("\\Apple Computer\\iTunes\\iTunes Plug-ins"));
 
-	dir.append(TEXT("\\iTunes\\iTunes Plug-ins"));
 	return dir;
 }
 
 
 #pragma once
 
-#ifdef HAVE_WINSDKVER_H
 #include "targetver.h"
-#endif
 
 #define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
 // Windows Header Files:

Plugin/targetver.h

 
 #pragma once
 
+#ifdef HAVE_WINSDKVER_H
 #include <WinSDKVer.h>
+#endif
 
 #define WINVER		 0x0502
 #define _WIN32_WINNT 0x0502
 
+#ifdef HAVE_WINSDKVER_H
 #include <SDKDDKVer.h>
+#endif
+