From: Hourier Date: Tue, 3 Nov 2020 12:51:03 +0000 (+0900) Subject: [Fix] #40913 Windows以外で新規のセーブデータを作成できない不具合を解消した / Resolved the issue that new game... X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8fff5c35bcc0940cc25c823cb144e6cfd2d74ae8;p=hengband%2Fhengband.git [Fix] #40913 Windows以外で新規のセーブデータを作成できない不具合を解消した / Resolved the issue that new game couldn't be started in non-Windows environment --- diff --git a/src/core/game-play.c b/src/core/game-play.c index 03f511ccf..0cf2c9a14 100644 --- a/src/core/game-play.c +++ b/src/core/game-play.c @@ -397,7 +397,7 @@ void play_game(player_type *player_ptr, bool new_game, bool browsing_movie) } restore_windows(player_ptr); - if (!load_savedata(player_ptr)) + if (!load_savedata(player_ptr, &new_game)) quit(_("セーブファイルが壊れています", "broken savefile")); extract_option_vars(); diff --git a/src/load/load.c b/src/load/load.c index 3f6d791c5..c79540778 100644 --- a/src/load/load.c +++ b/src/load/load.c @@ -264,7 +264,7 @@ static errr rd_savefile(player_type *player_ptr) * @param new_game セーブデータの新規作成が必要か否か * @return セーブデータが読み込めればtrue */ -bool load_savedata(player_type *player_ptr) +bool load_savedata(player_type *player_ptr, bool *new_game) { concptr what = "generic"; current_world_ptr->game_turn = 0; @@ -272,10 +272,13 @@ bool load_savedata(player_type *player_ptr) if (!savefile[0]) return TRUE; -#ifndef WINDOWS +#ifdef WINDOWS + (void)new_game; +#else if (access(savefile, 0) < 0) { msg_print(_("セーブファイルがありません。", "Savefile does not exist.")); msg_print(NULL); + *new_game = TRUE; return TRUE; } #endif diff --git a/src/load/load.h b/src/load/load.h index d53c6ef13..2b53bb70b 100644 --- a/src/load/load.h +++ b/src/load/load.h @@ -3,4 +3,4 @@ #include "floor/floor-save.h" #include "system/angband.h" -bool load_savedata(player_type *player_ptr); +bool load_savedata(player_type *player_ptr, bool *new_game);