several fixes for WIN32

better handle minimize/maximize
http://pulkomandy.tk/projects/GrafX2/ticket/102
This commit is contained in:
Thomas Bernard
2019-02-19 17:10:16 +01:00
parent 7d5f287737
commit 05175292a6
5 changed files with 45 additions and 13 deletions

View File

@@ -212,9 +212,9 @@ char * Get_config_directory(const char * program_dir)
// On all the remaining targets except OSX, the executable is in ./bin
config_dir = strdup(program_dir);
#else
len = strlen(program_dir) + 4;
len = strlen(program_dir) + 2 + strlen(PATH_SEPARATOR) + 1;
config_dir = malloc(len);
snprintf(config_dir, len, "%s%s", program_dir, "../");
snprintf(config_dir, len, "%s%s", program_dir, ".." PATH_SEPARATOR);
#endif
filename = Filepath_append_to_dir(config_dir, CONFIG_FILENAME);