1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-26 16:09:10 +00:00

(svn r5857) - Backport from trunk (r5800):

When directories were changed in 'Play Scenario', pressing 'New Game' showed
  scenarios from that directory, not the default one.
This commit is contained in:
Darkvater
2006-08-12 12:11:54 +00:00
parent a597fd50e6
commit f2e4b69d5c
3 changed files with 12 additions and 9 deletions

7
unix.c
View File

@@ -208,9 +208,10 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
int sort_start;
char filename[MAX_PATH];
if (_fios_scn_path == NULL) {
_fios_scn_path = malloc(MAX_PATH);
strcpy(_fios_scn_path, _path.scenario_dir);
/* Copy the default path on first run or on 'New Game' */
if (mode == SLD_NEW_GAME || _fios_scn_path == NULL) {
if (_fios_scn_path == NULL) _fios_scn_path = malloc(MAX_PATH);
ttd_strlcpy(_fios_scn_path, _path.scenario_dir, MAX_PATH);
}
_fios_path = _fios_scn_path;