shadowm

Untitled

Oct 1st, 2013
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.85 KB | None | 0 0
  1. diff --git a/src/filesystem.cpp b/src/filesystem.cpp
  2. index 8b5c6c1..ed83bbe 100644
  3. --- a/src/filesystem.cpp
  4. +++ b/src/filesystem.cpp
  5. @@ -540,9 +540,10 @@ void set_preferences_dir(std::string path)
  6.         //allow absolute path override
  7.         game_config::preferences_dir = path;
  8.     } else {
  9. -       WINAPI BOOL (*SHGetSpecialFolderPath)(HWND, LPTSTR, int, BOOL);
  10. +       typedef BOOL (WINAPI *SHGSFPAddress)(HWND, LPTSTR, int, BOOL);
  11. +       SHGSFPAddress SHGetSpecialFolderPath;
  12.         HMODULE module = LoadLibrary("shell32");
  13. -       SHGetSpecialFolderPath = (WINAPI BOOL (*)(HWND, LPTSTR, int, BOOL))GetProcAddress(module, "SHGetSpecialFolderPathA");
  14. +       SHGetSpecialFolderPath = (SHGSFPAddress)GetProcAddress(module, "SHGetSpecialFolderPathA");
  15.         if(SHGetSpecialFolderPath) {
  16.             LOG_FS << "Using SHGetSpecialFolderPath to find My Documents\n";
  17.             char my_documents_path[MAX_PATH];
Advertisement
Add Comment
Please, Sign In to add comment