From b7bf3ee62081977a0f5e6a6a6222a9538a72925f Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 20 Jun 2013 00:03:36 +0100 Subject: [PATCH] Simplify logic now SGPath::desktop works on Windows. --- src/Main/fg_init.cxx | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index e72e24e11..632998d56 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -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 static SGPath platformDefaultDataPath() @@ -422,11 +394,6 @@ static SGPath platformDefaultDataPath() return SGPath::home() / ".fgfs"; } #endif -SGPath platformDesktopPath() -{ - return SGPath::desktop(); -} -#endif void fgInitHome() { -- 2.39.5