From: Holger Schemel Date: Fri, 14 May 2021 16:46:42 +0000 (+0200) Subject: removed unused code for common (system-wide) data directory X-Git-Tag: 4.3.0.0~148 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1d189cb5b9d8266d6b1cee2ed6b5b42044cd13aa;p=rocksndiamonds.git removed unused code for common (system-wide) data directory --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 2580b6dc..37b7db12 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -1634,29 +1634,6 @@ char *getHomeDir(void) return dir; } -char *getCommonDataDir(void) -{ - static char *common_data_dir = NULL; - -#if defined(PLATFORM_WIN32) - if (common_data_dir == NULL) - { - char *dir = checked_malloc(MAX_PATH + 1); - - if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_COMMON_DOCUMENTS, NULL, 0, dir)) - && !strEqual(dir, "")) // empty for Windows 95/98 - common_data_dir = getPath2(dir, program.userdata_subdir); - else - common_data_dir = options.rw_base_directory; - } -#else - if (common_data_dir == NULL) - common_data_dir = options.rw_base_directory; -#endif - - return common_data_dir; -} - char *getPersonalDataDir(void) { static char *personal_data_dir = NULL; diff --git a/src/libgame/setup.h b/src/libgame/setup.h index da6c3f9f..0b7a8628 100644 --- a/src/libgame/setup.h +++ b/src/libgame/setup.h @@ -314,7 +314,6 @@ void sortTreeInfo(TreeInfo **); void freeTreeInfo(TreeInfo *); char *getHomeDir(void); -char *getCommonDataDir(void); char *getPersonalDataDir(void); char *getMainUserGameDataDir(void); char *getUserGameDataDir(void);