mirror of https://github.com/OpenRCT2/OpenRCT2.git
Set scenario save path upon successfully loading a park
Instead of setting the path when clicking on a file in the loadsave dialog, it's now set when the park gets actually loaded. This fixes the System Dialog not showing when saving a park loaded from command.
This commit is contained in:
parent
2c7e7123f7
commit
c5aececcb1
|
@ -927,9 +927,6 @@ static void window_loadsave_select(rct_window *w, const char *path)
|
|||
switch (_type & 0x0F) {
|
||||
case (LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME):
|
||||
save_path(&gConfigGeneral.last_save_game_directory, pathBuffer);
|
||||
safe_strcpy(gScenarioSavePath, pathBuffer, MAX_PATH);
|
||||
safe_strcpy(gCurrentLoadedPath, pathBuffer, MAX_PATH);
|
||||
gFirstTimeSaving = true;
|
||||
window_loadsave_invoke_callback(MODAL_RESULT_OK, pathBuffer);
|
||||
window_close_by_class(WC_LOADSAVE);
|
||||
gfx_invalidate_screen();
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "core/MemoryStream.h"
|
||||
#include "core/Path.hpp"
|
||||
#include "core/String.hpp"
|
||||
#include "core/Util.hpp"
|
||||
#include "FileClassifier.h"
|
||||
#include "HandleParkLoad.h"
|
||||
#include "network/network.h"
|
||||
|
@ -426,6 +427,9 @@ namespace OpenRCT2
|
|||
if (result.Error == PARK_LOAD_ERROR_OK)
|
||||
{
|
||||
parkImporter->Import();
|
||||
String::Set(gScenarioSavePath, Util::CountOf(gScenarioSavePath), path.c_str());
|
||||
String::Set(gCurrentLoadedPath, Util::CountOf(gCurrentLoadedPath), path.c_str());
|
||||
gFirstTimeSaving = true;
|
||||
game_fix_save_vars();
|
||||
sprite_position_tween_reset();
|
||||
gScreenAge = 0;
|
||||
|
|
Loading…
Reference in New Issue