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:
7
unix.c
7
unix.c
@@ -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;
|
||||
|
Reference in New Issue
Block a user