Merge remote-tracking branch 'upstream/master'
Conflicts: src/console_gui.cpp src/genworld_gui.cpp src/group_gui.cpp src/misc_gui.cpp src/settings_gui.cpp src/widgets/settings_widget.h
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
SaveLoadDialogMode _saveload_mode;
|
||||
LoadCheckData _load_check_data; ///< Data loaded from save during SL_LOAD_CHECK.
|
||||
|
||||
@@ -296,17 +298,17 @@ public:
|
||||
switch (_saveload_mode) {
|
||||
case SLD_SAVE_GAME:
|
||||
case SLD_LOAD_GAME:
|
||||
FioGetDirectory(o_dir.name, lengthof(o_dir.name), SAVE_DIR);
|
||||
FioGetDirectory(o_dir.name, lastof(o_dir.name), SAVE_DIR);
|
||||
break;
|
||||
|
||||
case SLD_SAVE_SCENARIO:
|
||||
case SLD_LOAD_SCENARIO:
|
||||
FioGetDirectory(o_dir.name, lengthof(o_dir.name), SCENARIO_DIR);
|
||||
FioGetDirectory(o_dir.name, lastof(o_dir.name), SCENARIO_DIR);
|
||||
break;
|
||||
|
||||
case SLD_SAVE_HEIGHTMAP:
|
||||
case SLD_LOAD_HEIGHTMAP:
|
||||
FioGetDirectory(o_dir.name, lengthof(o_dir.name), HEIGHTMAP_DIR);
|
||||
FioGetDirectory(o_dir.name, lastof(o_dir.name), HEIGHTMAP_DIR);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -652,10 +654,10 @@ public:
|
||||
} else if (this->IsWidgetLowered(WID_SL_SAVE_GAME)) { // Save button clicked
|
||||
if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO) {
|
||||
_switch_mode = SM_SAVE_GAME;
|
||||
FiosMakeSavegameName(_file_to_saveload.name, this->filename_editbox.text.buf, sizeof(_file_to_saveload.name));
|
||||
FiosMakeSavegameName(_file_to_saveload.name, this->filename_editbox.text.buf, lastof(_file_to_saveload.name));
|
||||
} else {
|
||||
_switch_mode = SM_SAVE_HEIGHTMAP;
|
||||
FiosMakeHeightmapName(_file_to_saveload.name, this->filename_editbox.text.buf, sizeof(_file_to_saveload.name));
|
||||
FiosMakeHeightmapName(_file_to_saveload.name, this->filename_editbox.text.buf, lastof(_file_to_saveload.name));
|
||||
}
|
||||
|
||||
/* In the editor set up the vehicle engines correctly (date might have changed) */
|
||||
|
||||
Reference in New Issue
Block a user