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

This commit is contained in:
Hielke Morsink committed 2016-01-05 00:23:51 +01:00
1 parent 6f4cf119e7
commit 3641634aad
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -1059,7 +1059,10 @@ void save_game()
}
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 ) {
+1 -1
View File
@@ -154,7 +154,7 @@ rct_window *window_loadsave_open(int type, char *defaultName)
int includeNewItem;
rct_window* w;
_type = type;
_defaultName[0] = 0;
_defaultName[0] = '\0';
if (!str_is_null_or_empty(defaultName)) {
safe_strncpy(_defaultName, defaultName, sizeof(_defaultName));