diff options
author | rubidium <rubidium@openttd.org> | 2007-06-17 15:48:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-17 15:48:57 +0000 |
commit | 347c28b71ac754aee20f8eeeae1df1a3b9a49d10 (patch) | |
tree | 8bc2a050b44170ed785af66e6e9045d429c789db /src/misc_gui.cpp | |
parent | 5fdde681c2aff0976eef8cea59422332527b3a65 (diff) | |
download | openttd-347c28b71ac754aee20f8eeeae1df1a3b9a49d10.tar.xz |
(svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
-Codechange: add support for personal directories on Windows.
-Fix [FS#153, FS#193, FS#502, FS#816, FS#854]: fix issues related to fixed names, fixed places of files/directories and application bundles.
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 276542cf9..f9bde39bb 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -37,6 +37,7 @@ #include "player_face.h" #include "fileio.h" +#include "fileio.h" #include "fios.h" /* Variables to display file lists */ FiosItem *_fios_list; @@ -1407,28 +1408,27 @@ static void SaveLoadDlgWndProc(Window *w, WindowEvent *e) static FiosItem o_dir; switch (e->event) { - case WE_CREATE: { // Set up OPENTTD button + case WE_CREATE: // Set up OPENTTD button o_dir.type = FIOS_TYPE_DIRECT; switch (_saveload_mode) { case SLD_SAVE_GAME: case SLD_LOAD_GAME: - ttd_strlcpy(&o_dir.name[0], _paths.save_dir, sizeof(o_dir.name)); + FioGetDirectory(o_dir.name, lengthof(o_dir.name), SAVE_DIR); break; case SLD_SAVE_SCENARIO: case SLD_LOAD_SCENARIO: - ttd_strlcpy(&o_dir.name[0], _paths.scenario_dir, sizeof(o_dir.name)); + FioGetDirectory(o_dir.name, lengthof(o_dir.name), SCENARIO_DIR); break; case SLD_LOAD_HEIGHTMAP: - ttd_strlcpy(&o_dir.name[0], _paths.heightmap_dir, sizeof(o_dir.name)); + FioGetDirectory(o_dir.name, lengthof(o_dir.name), HEIGHTMAP_DIR); break; default: - ttd_strlcpy(&o_dir.name[0], _paths.personal_dir, sizeof(o_dir.name)); + ttd_strlcpy(o_dir.name, _personal_dir, lengthof(o_dir.name)); } break; - } case WE_PAINT: { int pos; |