From: Holger Schemel Date: Thu, 15 Oct 2015 19:14:06 +0000 (+0200) Subject: removed some old Mac stuff not needed anymore X-Git-Tag: 4.0.0.0-rc1~139 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=677fb221d48bd71f0f6a7633dc415f895abedf94;p=rocksndiamonds.git removed some old Mac stuff not needed anymore --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 85832274..9a573b5e 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -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(); diff --git a/src/libgame/setup.h b/src/libgame/setup.h index 1f3b7b81..1e837a5b 100644 --- a/src/libgame/setup.h +++ b/src/libgame/setup.h @@ -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); diff --git a/src/libgame/system.c b/src/libgame/system.c index 85553281..b04cd9b5 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -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) diff --git a/src/libgame/system.h b/src/libgame/system.h index 6eca6f9b..03db4647 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -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(); diff --git a/src/main.c b/src/main.c index 84004f46..3fdc1939 100644 --- a/src/main.c +++ b/src/main.c @@ -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,