1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Prevent extension from showing when saving a park for the first time.

This commit is contained in:
Hielke Morsink
2016-01-04 23:41:18 +01:00
parent 6f4cf119e7
commit 3641634aad
2 changed files with 5 additions and 2 deletions

View File

@@ -1059,7 +1059,10 @@ void save_game()
} }
void save_game_as() void save_game_as()
{ {
window_loadsave_open(LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME, (char*)path_get_filename(gScenarioSavePath)); char name[MAX_PATH];
safe_strncpy(name, path_get_filename(gScenarioSavePath), MAX_PATH);
path_remove_extension(name);
window_loadsave_open(LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME, name);
} }
int compare_autosave_file_paths (const void * a, const void * b ) { int compare_autosave_file_paths (const void * a, const void * b ) {

View File

@@ -154,7 +154,7 @@ rct_window *window_loadsave_open(int type, char *defaultName)
int includeNewItem; int includeNewItem;
rct_window* w; rct_window* w;
_type = type; _type = type;
_defaultName[0] = 0; _defaultName[0] = '\0';
if (!str_is_null_or_empty(defaultName)) { if (!str_is_null_or_empty(defaultName)) {
safe_strncpy(_defaultName, defaultName, sizeof(_defaultName)); safe_strncpy(_defaultName, defaultName, sizeof(_defaultName));