fix of autosave
This commit is contained in:
parent
d88a3753b6
commit
8a6ea8623d
|
@ -1227,7 +1227,6 @@ int game_cmd(char *cmd)
|
|||
|
||||
game_music_player();
|
||||
game_sound_player();
|
||||
game_autosave();
|
||||
|
||||
if (!cmdstr)
|
||||
goto inv; /* hackish? ok, yes it is... */
|
||||
|
@ -1302,7 +1301,6 @@ int game_cmd(char *cmd)
|
|||
txt_layout_size(el_layout(el_ways), NULL, &ways_h);
|
||||
}
|
||||
|
||||
|
||||
if (game_theme.gfx_mode == GFX_MODE_EMBEDDED) {
|
||||
int off = 0;
|
||||
if (!new_pict && !new_place) {
|
||||
|
@ -1403,6 +1401,7 @@ inv:
|
|||
gfx_flip();
|
||||
// input_clear();
|
||||
err:
|
||||
game_autosave();
|
||||
if (err_msg) {
|
||||
game_menu(menu_warning);
|
||||
return -1;
|
||||
|
|
|
@ -373,13 +373,15 @@ int game_menu_act(const char *a)
|
|||
if (!curgame_dir)
|
||||
return 0;
|
||||
// free_last();
|
||||
|
||||
/* remove autlosave */
|
||||
s = game_save_path(0, 0);
|
||||
if (s && !access(s, R_OK) && opt_autosave)
|
||||
unlink (s);
|
||||
game_select(curgame_dir);
|
||||
game_menu_box(0, NULL);
|
||||
instead_eval("game:ini()"); instead_clear();
|
||||
game_cmd("look");
|
||||
s = game_save_path(0, 0);
|
||||
if (s && !access(s, R_OK) && opt_autosave)
|
||||
unlink (s);
|
||||
custom_theme_warn();
|
||||
} else if (!strcmp(a,"/main")) {
|
||||
if (restart_needed) {
|
||||
|
|
Loading…
Reference in a new issue