mirror of https://github.com/OpenTTD/OpenTTD
(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.release/0.4
parent
a597fd50e6
commit
f2e4b69d5c
7
os2.c
7
os2.c
|
@ -210,9 +210,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;
|
||||
|
|
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;
|
||||
|
|
7
win32.c
7
win32.c
|
@ -779,9 +779,10 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
|
|||
HANDLE h;
|
||||
int sort_start;
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue