]> git.mxchange.org Git - flightgear.git/commitdiff
Simplify logic now SGPath::desktop works on Windows.
authorJames Turner <jmt@Bishop.local>
Wed, 19 Jun 2013 23:03:36 +0000 (00:03 +0100)
committerJames Turner <jmt@Bishop.local>
Wed, 19 Jun 2013 23:03:36 +0000 (00:03 +0100)
src/Main/fg_init.cxx

index e72e24e11edf6ce7b513ee9b3f04ccf3729a3f7f..632998d5652ae4c2f5ca4d417c41f5bf5048a3da 100644 (file)
@@ -367,35 +367,7 @@ static SGPath platformDefaultDataPath()
   return config;
 }
 
-SGPath platformDesktopPath()
-{  
-    /*
-  typedef BOOL (WINAPI*GetSpecialFolderPath)(HWND, LPWSTR, int, BOOL);
-  static GetSpecialFolderPath SHGetSpecialFolderPath = NULL;
-
-  // lazy open+resolve of shell32
-  if (!SHGetSpecialFolderPath) {
-    HINSTANCE shellDll = ::LoadLibrary("shell32");
-    SHGetSpecialFolderPath = (GetSpecialFolderPath) GetProcAddress(shellDll, "SHGetSpecialFolderPathA");
-  }
-  
-  if (!SHGetSpecialFolderPath)
-    return SGPath();
-  
-  char path[PATH_MAX];
-  if (SHGetSpecialFolderPath(0, path, CSIDL_DESKTOPDIRECTORY, false)) {
-    return SGPath(path);
-  }
-  
-  // failed, bad
-  return SGPath();
-    */
-    // TODO real implementation and move to SGPath
-    return SGPath(fgGetString("/sim/fg-current"));
-}
-#else
-
-#ifdef __APPLE__
+#elif __APPLE__
 #include <CoreServices/CoreServices.h>
 
 static SGPath platformDefaultDataPath()
@@ -422,11 +394,6 @@ static SGPath platformDefaultDataPath()
   return SGPath::home() / ".fgfs";
 }
 #endif
-SGPath platformDesktopPath()
-{
-  return SGPath::desktop();
-}
-#endif
 
 void fgInitHome()
 {