removed some old Mac stuff not needed anymore
authorHolger Schemel <info@artsoft.org>
Thu, 15 Oct 2015 19:14:06 +0000 (21:14 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 15 Oct 2015 19:14:06 +0000 (21:14 +0200)
src/libgame/setup.c
src/libgame/setup.h
src/libgame/system.c
src/libgame/system.h
src/main.c

index 85832274fba1df988edcb2ce417db38a67392288..9a573b5e2d3678f133990ae0296660a905826e35 100644 (file)
@@ -1391,30 +1391,6 @@ char *getUserGameDataDir(void)
   return user_game_data_dir;
 }
 
-void updateUserGameDataDir()
-{
-#if defined(PLATFORM_MACOSX)
-  char *userdata_dir_old = getPath2(getHomeDir(), program.userdata_subdir_unix);
-  char *userdata_dir_new = getUserGameDataDir();       /* do not free() this */
-
-  /* convert old Unix style game data directory to Mac OS X style, if needed */
-  if (directoryExists(userdata_dir_old) && !directoryExists(userdata_dir_new))
-  {
-    if (rename(userdata_dir_old, userdata_dir_new) != 0)
-    {
-      Error(ERR_WARN, "cannot move game data directory '%s' to '%s'",
-           userdata_dir_old, userdata_dir_new);
-
-      /* continue using Unix style data directory -- this should not happen */
-      program.userdata_path = getPath2(getPersonalDataDir(),
-                                      program.userdata_subdir_unix);
-    }
-  }
-
-  free(userdata_dir_old);
-#endif
-}
-
 char *getSetupDir()
 {
   return getUserGameDataDir();
index 1f3b7b8186de88f1de38b895f18f2e203ef8adbb..1e837a5bac40ccbe648aeba9f0861f1f06b262b6 100644 (file)
@@ -272,8 +272,6 @@ char *getUserGameDataDir(void);
 char *getSetupDir(void);
 char *getCurrentLevelDir(void);
 
-void updateUserGameDataDir(void);
-
 void createDirectory(char *, char *, int);
 void InitUserDataDirectory(void);
 void SetFilePermissions(char *, int);
index 8555328112113a6f88b373719b36c64fdf4ae036..b04cd9b57ed29d47e9146face31efc909461d213 100644 (file)
@@ -63,8 +63,7 @@ int                   FrameCounter = 0;
 /* init/close functions                                                      */
 /* ========================================================================= */
 
-void InitProgramInfo(char *argv0, char *config_filename,
-                    char *userdata_subdir, char *userdata_subdir_unix,
+void InitProgramInfo(char *argv0, char *config_filename, char *userdata_subdir,
                     char *program_title, char *icon_title,
                     char *icon_filename, char *cookie_prefix,
                     int program_version)
@@ -75,7 +74,6 @@ void InitProgramInfo(char *argv0, char *config_filename,
   program.config_filename = config_filename;
 
   program.userdata_subdir = userdata_subdir;
-  program.userdata_subdir_unix = userdata_subdir_unix;
   program.userdata_path = getUserGameDataDir();
 
   program.program_title = program_title;
@@ -132,10 +130,6 @@ void InitPlatformDependentStuff(void)
   // this is initialized in GetOptions(), but may already be used before
   options.verbose = TRUE;
 
-#if defined(PLATFORM_MACOSX)
-  updateUserGameDataDir();
-#endif
-
   OpenLogFiles();
 
 #if defined(TARGET_SDL2)
index 6eca6f9b5e105b88d3840dbdf5bbb149a7379b9a..03db4647fb2d079375805248aeee720e1c5aab46 100644 (file)
@@ -655,7 +655,6 @@ struct ProgramInfo
   char *maindata_path;         /* main game data (installation) directory */
 
   char *userdata_subdir;       /* personal user game data directory */
-  char *userdata_subdir_unix;  /* personal user game data directory (Unix) */
   char *userdata_path;         /* resulting full path to game data directory */
 
   char *program_title;
@@ -1286,7 +1285,7 @@ extern int                        FrameCounter;
 /* function definitions */
 
 void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *,
-                    char *, int);
+                    int);
 
 void SetWindowTitle();
 
index 84004f468283e1c8b5e3e28b9948fa962fca2fb6..3fdc19391a262be4ea2ac1ab71c4de48c39a0a0e 100644 (file)
@@ -5630,10 +5630,10 @@ static void print_version()
 
 static void InitProgramConfig(char *command_filename)
 {
-  char *userdata_basename = getBaseNameNoSuffix(command_filename);
-  char *config_filename = getProgramConfigFilename(command_filename);
   char *program_title = PROGRAM_TITLE_STRING;
   char *program_icon_file = PROGRAM_ICON_FILENAME;
+  char *config_filename = getProgramConfigFilename(command_filename);
+  char *userdata_basename = getBaseNameNoSuffix(command_filename);
   char *userdata_subdir;
   char *userdata_subdir_unix;
 
@@ -5673,7 +5673,6 @@ static void InitProgramConfig(char *command_filename)
   InitProgramInfo(command_filename,
                  config_filename,
                  userdata_subdir,
-                 userdata_subdir_unix,
                  program_title,
                  program_title,
                  program_icon_file,